add indicator on thickness slider to show the tool affected

This commit is contained in:
raphael
2019-02-05 13:51:59 +01:00
parent 2a2102f725
commit 4e76f40aea
3 changed files with 9 additions and 3 deletions

View File

@@ -62,7 +62,13 @@ $(document).ready(function () {
$(".whiteboardTool").click(function () {
$(".whiteboardTool").removeClass("active");
$(this).addClass("active");
whiteboard.setTool($(this).attr("tool"));
var activeTool = $(this).attr("tool");
whiteboard.setTool(activeTool);
if(activeTool == "mouse" || activeTool == "recSelect") {
$(".activeToolIcon").empty();
} else {
$(".activeToolIcon").html($(this).html()); //Set Active icon the same as the button icon
}
});
// upload image button