send new paintbucket fills to back
This commit is contained in:
+9
-3
@@ -196,7 +196,8 @@ let actions = {
|
|||||||
context: {
|
context: {
|
||||||
fillShape: c.fillShape,
|
fillShape: c.fillShape,
|
||||||
strokeShape: c.strokeShape,
|
strokeShape: c.strokeShape,
|
||||||
fillStyle: c.fillStyle
|
fillStyle: c.fillStyle,
|
||||||
|
sendToBack: c.sendToBack
|
||||||
},
|
},
|
||||||
uuid: uuidv4()
|
uuid: uuidv4()
|
||||||
}
|
}
|
||||||
@@ -222,7 +223,7 @@ let actions = {
|
|||||||
}
|
}
|
||||||
let shapes = shape.update()
|
let shapes = shape.update()
|
||||||
for (let newShape of shapes) {
|
for (let newShape of shapes) {
|
||||||
object.addShape(newShape)
|
object.addShape(newShape, cxt.sendToBack)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
rollback: (action) => {
|
rollback: (action) => {
|
||||||
@@ -1952,9 +1953,13 @@ class GraphicsObject {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
addShape(shape) {
|
addShape(shape, sendToBack=false) {
|
||||||
|
if (sendToBack) {
|
||||||
|
this.currentFrame.shapes.unshift(shape)
|
||||||
|
} else {
|
||||||
this.currentFrame.shapes.push(shape)
|
this.currentFrame.shapes.push(shape)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
addObject(object, x=0, y=0) {
|
addObject(object, x=0, y=0) {
|
||||||
this.children.push(object)
|
this.children.push(object)
|
||||||
object.parent = this
|
object.parent = this
|
||||||
@@ -2777,6 +2782,7 @@ function stage() {
|
|||||||
...context,
|
...context,
|
||||||
fillShape: true,
|
fillShape: true,
|
||||||
strokeShape: false,
|
strokeShape: false,
|
||||||
|
sendToBack: true
|
||||||
}
|
}
|
||||||
let shape = new Shape(regionPoints[0].x, regionPoints[0].y, cxt)
|
let shape = new Shape(regionPoints[0].x, regionPoints[0].y, cxt)
|
||||||
shape.fromPoints(points, 1)
|
shape.fromPoints(points, 1)
|
||||||
|
|||||||
Reference in New Issue
Block a user