mirror of
https://github.com/piskelapp/piskel.git
synced 2023-08-10 21:12:52 +03:00
Removed checks against 0 when moving/shifting frames. They didnt bring anything and were making the behavior sloppy
This commit is contained in:
parent
3e7d576f7e
commit
339ab39ce6
@ -28,9 +28,7 @@
|
||||
|
||||
ns.Move.prototype.moveToolAt = function(col, row, color, frame, overlay) {
|
||||
var colDiff = col - this.startCol, rowDiff = row - this.startRow;
|
||||
if (colDiff != 0 || rowDiff != 0) {
|
||||
this.shiftFrame(colDiff, rowDiff, frame, this.frameClone);
|
||||
}
|
||||
this.shiftFrame(colDiff, rowDiff, frame, this.frameClone);
|
||||
};
|
||||
|
||||
ns.Move.prototype.shiftFrame = function (colDiff, rowDiff, frame, reference) {
|
||||
|
@ -131,13 +131,13 @@
|
||||
var deltaRow = row - this.lastRow;
|
||||
|
||||
var colDiff = col - this.startCol, rowDiff = row - this.startRow;
|
||||
if (colDiff != 0 || rowDiff != 0) {
|
||||
// Shifting selection on overlay frame:
|
||||
this.shiftOverlayFrame_(colDiff, rowDiff, overlay, this.overlayFrameReference);
|
||||
|
||||
// Shifting selection on overlay frame:
|
||||
this.shiftOverlayFrame_(colDiff, rowDiff, overlay, this.overlayFrameReference);
|
||||
|
||||
// Update selection model:
|
||||
$.publish(Events.SELECTION_MOVE_REQUEST, [deltaCol, deltaRow]);
|
||||
|
||||
// Update selection model:
|
||||
$.publish(Events.SELECTION_MOVE_REQUEST, [deltaCol, deltaRow]);
|
||||
}
|
||||
this.lastCol = col;
|
||||
this.lastRow = row;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user