Commit a9d0cb0b authored by Anton Koch's avatar Anton Koch

Merge branch '366-buggy-cell-movement-and-resize---mosys' into 'master'

fixed buggy cell moving and resizing (#366)

See merge request !36
parents 401e4ff1 064bbe21
Pipeline #51724 passed with stage
in 4 minutes and 9 seconds
......@@ -548,12 +548,14 @@
moveHandler = this.cellHandler.move,
resizeHandler = this.cellHandler.resize,
tempCell = this.tempCell,
selectedCell = this.selectedCell,
gridRows = this.data.configuration.rows,
gridColumns = this.data.configuration.columns
if (obj.isFirst) {
moveHandler.pushed = true
tempCell.type = 'edit'
Object.assign(tempCell, { x: selectedCell.x, y: selectedCell.y, width: selectedCell.w, height: selectedCell.h })
}
// move handler while pushing handler
......@@ -591,17 +593,20 @@
x: fullCell.width * (moveHandler.gridPosition.column - 1) + 8 + 20,
y: fullCell.height * (moveHandler.gridPosition.row - 1) + 8 + 20
})
Object.assign(selectedCell, { x: tempCell.x, y: tempCell.y, w: tempCell.width, h: tempCell.height })
}
},
resizeCell (obj) {
let
pos = this.getGridPositionForEvent(obj),
resizeHandler = this.cellHandler.resize,
tempCell = this.tempCell
tempCell = this.tempCell,
selectedCell = this.selectedCell
if (obj.isFirst) {
resizeHandler.pushed = true
tempCell.type = 'edit'
Object.assign(tempCell, { x: selectedCell.x, y: selectedCell.y, width: selectedCell.w, height: selectedCell.h })
}
Object.assign(tempCell, {
......@@ -628,6 +633,7 @@
x: fullCell.width * _x - 8 - 20,
y: fullCell.height * _y - 8 - 20
})
Object.assign(selectedCell, { x: tempCell.x, y: tempCell.y, w: tempCell.width, h: tempCell.height })
}
},
/*
......@@ -801,7 +807,7 @@
w = parsed.xywh[2],
h = parsed.xywh[3]
Object.assign(tempCell, { x: x, y: y, width: w, height: h })
Object.assign(this.selectedCell, { x: x, y: y, w: w, h: h })
// handler positioning
if (!this.cachedNewCell) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment