OWL ITS + 탐지시스템(인터넷 진흥원)
jhjang
2021-10-14 3052936fed9166521b0557a36df83eb11a5e51ee
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
/**
 * Created by wisestone on 2018-05-09.
 */
'use strict';
 
define(['app'],
    function (app) {
 
        app.directive('colorPalettePicker', [
            function () {
                return {
                    scope : {
                        target : "="
                    },
                    restrict : 'A',
                    link : function (scope, element, attrs) {
 
                        $(element).colorPalette({
                                colors : [
                                    ["#665fff", "#3598fe", "#3bcde2", "#98c220", "#357d57", "#c940ea", "#ff5f99", "#ff9057"],
                                    ["#febd35", "#888888"]
                                ]
                            })
                            .on('selectColor', function (e) {
                                scope.target = e.color;
 
                                if (scope.$root.$$phase != '$apply' && scope.$root.$$phase != '$digest') {
                                    scope.$apply();
                                }
                            });
                    }
                }
            }])
    });