Skip to content

Commit

Permalink
reverted to old fillBucket
Browse files Browse the repository at this point in the history
  • Loading branch information
nick-wick committed Sep 29, 2020
1 parent 23ff1fa commit 76472de
Show file tree
Hide file tree
Showing 8 changed files with 192,938 additions and 195,557 deletions.
96,928 changes: 48,199 additions & 48,729 deletions engine/dist/emptyproject.html

Large diffs are not rendered by default.

96,884 changes: 48,177 additions & 48,707 deletions engine/dist/wickengine.js

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions engine/src/ToolSettings.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,10 @@ Wick.ToolSettings = class {
default: true,
}, {
type: "number",
name: 'fillSmoothing',
default: 100,
name: 'gapFillAmount',
default: 1,
min: 0,
max: 250,
max: 5,
step: 1,
}, {
/**
Expand Down
12 changes: 7 additions & 5 deletions engine/src/tools/FillBucket.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,22 +60,24 @@ Wick.Tools.FillBucket = class extends Wick.Tool {
this.paper.hole({
point: e.point,
bgColor: new paper.Color(this.project.backgroundColor.hex),
gapFillAmount: this.getSetting('gapFillAmount'),
layers: this.project.activeFrames.filter(frame => {
return !frame.parentLayer.hidden;
}).map(frame => {
return frame.view.objectsLayer;
}),
fillColor: this.getSetting('fillColor'),
onFinish: (path) => {
this.setCursor('default');
if (path) {
path.fillColor = this.getSetting('fillColor').rgba;
path.strokeWidth = this.getSetting('fillSmoothing') / 100;
path.strokeColor = this.getSetting('fillColor').rgba;
path.name = null;
this.addPathToProject();
this.paper.project.activeLayer.addChild(path);
this.paper.OrderingUtils.bringToFront([path]);
if (e.item) {
path.insertAbove(e.item);
} else {
this.paper.project.activeLayer.addChild(path);
this.paper.OrderingUtils.sendToBack([path]);
}
this.fireEvent('canvasModified');
}
},
Expand Down
Loading

0 comments on commit 76472de

Please sign in to comment.