Commit 3c602847 authored by Anton Koch's avatar Anton Koch

Merge branch '369-cell-handlers-inside-grid-only---mosys' into 'release_2_0'

fixed cell manipulation via handler: limited to grid area now (#369)

See merge request !45
parents c5ff5131 89a5ce37
Pipeline #55011 passed with stage
in 19 minutes and 2 seconds
......@@ -79,6 +79,7 @@
width handler-width
height handler-width
transition opacity ease 350ms
transition-delay 100ms
opacity 0
&.hide
......
......@@ -516,7 +516,9 @@
}
// intersecting
else if (isNaN(_offsetLeft)) {
if (moveHandler.intersectingMainHandler && moveHandler.side === 'right') resizeHandler.intersectingMainHandler = false
if (moveHandler.intersectingMainHandler &&
moveHandler.side === 'right' &&
moveHandler.x > 0) resizeHandler.intersectingMainHandler = false
}
// behind right side
else if (_offsetLeft === 1) {
......@@ -1112,8 +1114,21 @@
const oy = _clientY + this.$el.scrollTop - elContainerBoundingBox.y - offset.y
// const ox = event.clientX + this.$el.scrollLeft - elContainerBoundingBox.x - offset.x
// const oy = event.clientY + this.$el.scrollTop - elContainerBoundingBox.y - offset.y
const x = Math.ceil(ox / this.gridDimensions.full.cell.width)
const y = Math.ceil(oy / this.gridDimensions.full.cell.height)
const { configuration } = this.data
let x
const _x = Math.ceil(ox / this.gridDimensions.full.cell.width)
if (_x <= 0) x = 1
else if (_x > configuration.columns) x = configuration.columns
else x = _x
let y
const _y = Math.ceil(oy / this.gridDimensions.full.cell.height)
if (_y <= 0) y = 1
else if (_y > configuration.rows) y = configuration.rows
else y = _y
console.log(this.cellHandler.move.y)
return { x: x, y: y, ox: ox, oy: oy }
},
updateGridDimensions (size) {
......
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