fix(colorPicker): cleaned setup of new lib

This commit is contained in:
Florent Chehab 2020-04-19 16:49:39 +02:00
parent 6025dc595a
commit 99378c276b
No known key found for this signature in database
GPG Key ID: 9A0CE018889EA246
2 changed files with 8 additions and 8 deletions

View File

@ -66,11 +66,9 @@
<input title="Thickness" id="whiteboardThicknessSlider" <input title="Thickness" id="whiteboardThicknessSlider"
style="position: absolute; left:9px; width: 130px; top: 15px;" type="range" min="1" max="50" style="position: absolute; left:9px; width: 130px; top: 15px;" type="range" min="1" max="50"
value="3"> value="3">
<div title="Colorpicker" <div id="whiteboardColorpicker"
style="position: absolute; left: 155px; top: 10px; width: 26px; height: 23px; border-radius: 3px; overflow: hidden; border: 1px solid darkgrey;"> style="position: absolute; left: 155px; top: 10px; width: 26px; height: 23px; border-radius: 3px; border: 1px solid darkgrey;"
<div id="whiteboardColorpicker" value="#000000" data-color="#000000">
style="width: 40px; height: 35px; border: 0px; padding: 0px; position: relative; top: 0px; left: -5px;">
</div>
</div> </div>
</button> </button>
</div> </div>

View File

@ -510,9 +510,11 @@ $(document).ready(function () {
whiteboard.dropIndicator.hide(); whiteboard.dropIndicator.hide();
}); });
$('#whiteboardColorpicker').colorPicker({ new Picker({
renderCallback: function (elm) { parent: $('#whiteboardColorpicker')[0],
whiteboard.setDrawColor(elm.val()); color: "#000000",
onChange: function(color) {
whiteboard.setDrawColor(color.rgbaString);
} }
}); });
}); });