Skip to content
Open
8 changes: 7 additions & 1 deletion engine/src/ToolSettings.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,11 @@ Wick.ToolSettings = class {
type: 'color',
name: 'forwardOnionSkinTint',
default: new Wick.Color('rgba(0, 0, 255, .5)'),
},{
}, {
type: "boolean",
name: "imageSmoothing",
default: true
}, {
type: "choice",
name: 'brushMode',
default: 'none',
Expand All @@ -118,6 +122,8 @@ Wick.ToolSettings = class {
this._settings = {};
this._onSettingsChangedCallback = () => {};

this.project = null

this.resetAllSettings();
this.loadSettingsFromLocalstorage();
}
Expand Down
1 change: 1 addition & 0 deletions engine/src/base/Project.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ Wick.Project = class extends Wick.Base {
this.activeTool = 'cursor';

this._toolSettings = new Wick.ToolSettings();
this._toolSettings.project = this
this._toolSettings.onSettingsChanged((name, value) => {
if (name === 'fillColor') {
this.selection.fillColor = value.rgba;
Expand Down
4 changes: 4 additions & 0 deletions engine/src/view/View.Path.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ Wick.View.Path = class extends Wick.View {

this.importJSON(this.model.json);

if(this.model.pathType == 'image') {
this.item.smoothing = this.model.project.toolSettings.getSetting('imageSmoothing')
};

// Apply onion skin style if Needed
// (This is done here in the Path code because we actually change the style of the path
// if the current onion skin mode is set to "outlines" or "tint")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,13 @@ class EditorSettings extends Component {
return (
<div className="editor-settings-modal-body">
<div className="editor-settings-group">
<label htmlFor="image-smoothing" className="editor-settings-group-title">Image Smoothing</label>
<WickInput
type="checkbox"
id="image-smoothing"
checked={this.props.getToolSetting('imageSmoothing')}
onChange={(bool) => {this.props.setToolSetting('imageSmoothing', bool.target.checked)}}
/>
<label htmlFor="clipboard-mode" className="editor-settings-group-title">Clipboard</label>
Mode:
<WickInput
Expand Down
1 change: 1 addition & 0 deletions src/Editor/Modals/SettingsModal/SettingsModal.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ class SettingsModal extends Component {
lastColorsUsed={this.props.lastColorsUsed}
getToolSetting={this.props.getToolSetting}
setToolSetting={this.props.setToolSetting}
project={this.props.project}
toggle={this.props.toggle}
getToolSettingRestrictions={this.props.getToolSettingRestrictions}/>
</TabbedInterface>
Expand Down