send new paintbucket fills to back

This commit is contained in:
Skyler Lehmkuhl 2024-12-11 15:35:57 -05:00
parent a7b4ea8789
commit e6f70d1fdc
1 changed files with 10 additions and 4 deletions

View File

@ -196,7 +196,8 @@ let actions = {
context: {
fillShape: c.fillShape,
strokeShape: c.strokeShape,
fillStyle: c.fillStyle
fillStyle: c.fillStyle,
sendToBack: c.sendToBack
},
uuid: uuidv4()
}
@ -222,7 +223,7 @@ let actions = {
}
let shapes = shape.update()
for (let newShape of shapes) {
object.addShape(newShape)
object.addShape(newShape, cxt.sendToBack)
}
},
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)
}
}
addObject(object, x=0, y=0) {
this.children.push(object)
object.parent = this
@ -2777,6 +2782,7 @@ function stage() {
...context,
fillShape: true,
strokeShape: false,
sendToBack: true
}
let shape = new Shape(regionPoints[0].x, regionPoints[0].y, cxt)
shape.fromPoints(points, 1)