mirror of
https://github.com/viliusle/miniPaint.git
synced 2026-02-06 13:26:46 +00:00
Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
2fa0c079e9
@ -366,11 +366,6 @@ class Base_selection_class {
|
||||
var w = settings.data.width;
|
||||
var h = settings.data.height;
|
||||
|
||||
var is_rotated = false;
|
||||
if (settings.data != null && settings.data.rotate != null && settings.data.rotate > 0) {
|
||||
is_rotated = true;
|
||||
}
|
||||
|
||||
//simplify checks
|
||||
var event_type = e.type;
|
||||
if(event_type == 'touchstart') event_type = 'mousedown';
|
||||
@ -511,22 +506,19 @@ class Base_selection_class {
|
||||
mainWrapper.style.cursor = "move";
|
||||
}
|
||||
|
||||
if(is_rotated == false) {
|
||||
for (let current_drag_type in this.selected_obj_positions) {
|
||||
const position = this.selected_obj_positions[current_drag_type];
|
||||
|
||||
if (position.path && this.ctx.isPointInPath(position.path, mouse.x, mouse.y)) {
|
||||
//match
|
||||
if (event_type == 'mousedown') {
|
||||
if (e.buttons == 1 || typeof e.buttons == "undefined") {
|
||||
this.mouse_lock = 'selected_object_actions';
|
||||
this.selected_object_drag_type = current_drag_type;
|
||||
}
|
||||
}
|
||||
if (event_type == 'mousemove') {
|
||||
mainWrapper.style.cursor = position.cursor;
|
||||
for (let current_drag_type in this.selected_obj_positions) {
|
||||
const position = this.selected_obj_positions[current_drag_type];
|
||||
if (position.path && this.ctx.isPointInPath(position.path, mouse.x, mouse.y)) {
|
||||
// match
|
||||
if (event_type == 'mousedown') {
|
||||
if (e.buttons == 1 || typeof e.buttons == "undefined") {
|
||||
this.mouse_lock = 'selected_object_actions';
|
||||
this.selected_object_drag_type = current_drag_type;
|
||||
}
|
||||
}
|
||||
if (event_type == 'mousemove') {
|
||||
mainWrapper.style.cursor = position.cursor;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user