mirror of
https://github.com/viliusle/miniPaint.git
synced 2026-02-06 16:06:47 +00:00
image info update
This commit is contained in:
parent
833685d679
commit
88a465689e
@ -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();
|
||||
|
||||
@ -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) {
|
||||
|
||||
14
js/image.js
14
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
|
||||
|
||||
@ -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")
|
||||
|
||||
Loading…
Reference in New Issue
Block a user