mirror of
https://github.com/piskelapp/piskel.git
synced 2023-08-10 21:12:52 +03:00
Adding basic color picker
This commit is contained in:
@@ -41,6 +41,7 @@
|
||||
this.initDrawingArea();
|
||||
this.initPreviewSlideshow();
|
||||
this.initAnimationPreview();
|
||||
this.initColorPicker();
|
||||
},
|
||||
|
||||
setActiveFrame: function(index) {
|
||||
@@ -67,6 +68,14 @@
|
||||
return activeFrameIndex;
|
||||
},
|
||||
|
||||
initColorPicker: function() {
|
||||
var colorPicker = document.getElementById('color-picker');
|
||||
colorPicker.value = DEFAULT_PEN_COLOR;
|
||||
colorPicker.addEventListener('change', function(evt) {
|
||||
penColor = colorPicker.value;
|
||||
});
|
||||
},
|
||||
|
||||
initDrawingArea : function() {
|
||||
drawingAreaContainer = $('drawing-canvas-container');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user