UNPKG

angular-canvas-painter

Version:

Angular.js directive to paint on a canvas on desktop or touch devices

19 lines (17 loc) 420 B
'use strict'; angular.module('pw.canvas-painter') .directive('pwColorSelector', function () { return { restrict: 'AE', scope: { colorList: '=pwColorSelector', selectedColor: '=color' }, templateUrl: '../templates/color-selector.html', link: function(scope){ scope.setColor = function(col){ scope.selectedColor = col; }; } }; });