diff --git a/js/draw_tools.js b/js/draw_tools.js index e184cc0..0889772 100644 --- a/js/draw_tools.js +++ b/js/draw_tools.js @@ -1322,7 +1322,6 @@ function DRAW_TOOLS_CLASS() { } //resize - EDIT.save_state(); WIDTH = this.select_data.w; HEIGHT = this.select_data.h; LAYER.set_canvas_size(); diff --git a/js/events.js b/js/events.js index c823257..3f46a5e 100644 --- a/js/events.js +++ b/js/events.js @@ -582,7 +582,9 @@ function EVENTS_CLASS() { EDIT.save_state(); FILE.open_handler(e); }; - this.mouse_wheel_handler = function (e) { //return true; + this.mouse_wheel_handler = function (e) { + if(POP.active == true) + return; e.preventDefault(); //zoom if (EVENTS.ctrl_pressed == true) { diff --git a/js/image.js b/js/image.js index 0c5bbf0..123ea27 100644 --- a/js/image.js +++ b/js/image.js @@ -12,15 +12,14 @@ function IMAGE_CLASS() { //information this.image_information = function () { - var colors = this.unique_colors_count(canvas_active(true)); - colors = HELPER.number_format(colors, 0); + var _this = this; var pixels = WIDTH*HEIGHT; pixels = HELPER.number_format(pixels, 0); POP.add({title: "Width:", value: WIDTH}); POP.add({title: "Height:", value: HEIGHT}); POP.add({title: "Pixels:", value: pixels}); - POP.add({title: "Unique colors:", value: colors}); + POP.add({title: "Unique colors:", value: '...'}); //show general data for (var i in FILE.file_info.general){ @@ -38,7 +37,14 @@ function IMAGE_CLASS() { n++; } - POP.show('Information', ''); + POP.show('Information', null, null, function(){ + //calc colors + setTimeout(function(){ + var colors = _this.unique_colors_count(canvas_active(true)); + colors = HELPER.number_format(colors, 0); + document.getElementById('pop_data_uniquecolo').innerHTML = colors; + }, 10); + }); }; //size diff --git a/libs/popup.js b/libs/popup.js index 00b3270..3686e94 100644 --- a/libs/popup.js +++ b/libs/popup.js @@ -277,7 +277,7 @@ function popup() { document.getElementById("popup").style.overflowY = 'hidden'; //onload - if (this.onload != '') { + if (this.onload) { if (typeof this.onload == "string") window[this.onload](); else @@ -452,7 +452,7 @@ function popup() { this.onload = false; this.preview_in_main = false; this.effects = false; - if (this.handler != '') { + if (this.handler) { if (typeof this.handler == "object") this.handler[0][this.handler[1]](response); else if (typeof this.handler == "function")