Skip to content

Commit

Permalink
Merge branch 'pr/277'
Browse files Browse the repository at this point in the history
  • Loading branch information
Luxapodular committed Sep 29, 2020
2 parents f9bf651 + 76472de commit d5ed7cc
Show file tree
Hide file tree
Showing 8 changed files with 930 additions and 3,549 deletions.
902 changes: 186 additions & 716 deletions engine/dist/emptyproject.html

Large diffs are not rendered by default.

902 changes: 186 additions & 716 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 d5ed7cc

Please sign in to comment.