mirror of
https://github.com/Ttanasart-pt/Pixel-Composer.git
synced 2024-12-25 06:26:42 +01:00
- [Graph Panel] Fix preview scale error when zoom out very far.
This commit is contained in:
parent
e5d28abe59
commit
8ee605d1ae
2 changed files with 6 additions and 6 deletions
|
@ -82,8 +82,8 @@ function __BBOX() constructor {
|
||||||
|
|
||||||
xc = (x0 + x1) / 2;
|
xc = (x0 + x1) / 2;
|
||||||
yc = (y0 + y1) / 2;
|
yc = (y0 + y1) / 2;
|
||||||
w = x1 - x0;
|
w = max(0, abs(x1 - x0));
|
||||||
h = y1 - y0;
|
h = max(0, abs(y1 - y0));
|
||||||
|
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
|
@ -93,7 +93,7 @@ function Node_Crop(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons
|
||||||
inputs[| 6].setVisible(_asp > 0 && _fit == 0);
|
inputs[| 6].setVisible(_asp > 0 && _fit == 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny, params) { #region
|
static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny, params) {
|
||||||
PROCESSOR_OVERLAY_CHECK
|
PROCESSOR_OVERLAY_CHECK
|
||||||
|
|
||||||
var _inSurf = current_data[0];
|
var _inSurf = current_data[0];
|
||||||
|
@ -332,7 +332,7 @@ function Node_Crop(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons
|
||||||
draw_rectangle(_px0, _py0, _px1, _py1, true);
|
draw_rectangle(_px0, _py0, _px1, _py1, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
} #endregion
|
}
|
||||||
|
|
||||||
static onValueUpdate = function(index) {
|
static onValueUpdate = function(index) {
|
||||||
if(index != 3) return;
|
if(index != 3) return;
|
||||||
|
@ -347,7 +347,7 @@ function Node_Crop(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons
|
||||||
inputs[| 6].setValue(min(_dim[0], _dim[1] * _ratio));
|
inputs[| 6].setValue(min(_dim[0], _dim[1] * _ratio));
|
||||||
}
|
}
|
||||||
|
|
||||||
static processData = function(_outSurf, _data, _output_index, _array_index) { #region
|
static processData = function(_outSurf, _data, _output_index, _array_index) {
|
||||||
var _inSurf = _data[0];
|
var _inSurf = _data[0];
|
||||||
var _crop = _data[1];
|
var _crop = _data[1];
|
||||||
var _asp = _data[3];
|
var _asp = _data[3];
|
||||||
|
@ -410,5 +410,5 @@ function Node_Crop(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons
|
||||||
}
|
}
|
||||||
|
|
||||||
return _outSurf;
|
return _outSurf;
|
||||||
} #endregion
|
}
|
||||||
}
|
}
|
Loading…
Reference in a new issue