picker starts withthe right color

This commit is contained in:
JFH
2021-01-01 12:35:16 +01:00
parent 9c0dedb89a
commit 7e33ea2bdc
2 changed files with 6 additions and 5 deletions

View File

@@ -187,6 +187,9 @@ class BottomPanelHandlers {
$id('stroke_linecap').addEventListener('change', (evt) => this.handleStrokeAttr.bind(this)('stroke-linecap', evt));
$id('opacity_dropdown').addEventListener('change', this.handleOpacity.bind(this));
$id('palette').addEventListener('change', this.handlePalette.bind(this));
const {curConfig} = this.editor.configObj;
$id('fill_color').setPaint(new $.jGraduate.Paint({alpha: 100, solidColor: curConfig.initFill.color}));
$id('stroke_color').setPaint(new $.jGraduate.Paint({alpha: 100, solidColor: curConfig.initStroke.color}));
}
}