Fixes dropped fills on draw shapes
This commit is contained in:
parent
08c5166b61
commit
322ce81fb6
1 changed files with 5 additions and 3 deletions
|
@ -125,11 +125,13 @@ export default class DrawSession extends BaseSession {
|
||||||
const page = tld.getPage(data)
|
const page = tld.getPage(data)
|
||||||
const shape = page.shapes[snapshot.id] as DrawShape
|
const shape = page.shapes[snapshot.id] as DrawShape
|
||||||
|
|
||||||
if (shape.points.length < this.points.length) {
|
if (vec.dist(this.points[0], this.points[this.points.length - 1]) < 8) {
|
||||||
getShapeUtils(shape).setProperty(shape, 'points', this.points)
|
this.points.push(this.points[0])
|
||||||
}
|
}
|
||||||
|
|
||||||
getShapeUtils(shape).onSessionComplete(shape)
|
getShapeUtils(shape)
|
||||||
|
.setProperty(shape, 'points', this.points)
|
||||||
|
.onSessionComplete(shape)
|
||||||
|
|
||||||
tld.updateParents(data, [shape.id])
|
tld.updateParents(data, [shape.id])
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue