From c7023134898554b27ff78bed0541d6a25074f190 Mon Sep 17 00:00:00 2001 From: XWiki SAS Date: Mon, 12 Jun 2017 17:34:45 +0200 Subject: [PATCH] change label texte --- www/whiteboard/main.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/www/whiteboard/main.js b/www/whiteboard/main.js index dce656473..a96fdb457 100644 --- a/www/whiteboard/main.js +++ b/www/whiteboard/main.js @@ -50,7 +50,7 @@ define([ }; var $toggle = $('#toggleDraw'); - var $width = $('#width'); + var $width = $('#width'); // brush width var $widthLabel = $('label[for="width"]'); var $opacity = $('#opacity'); var $opacityLabel = $('label[for="opacity"]'); @@ -98,7 +98,9 @@ window.canvas = canvas; var val = $width.val(); canvas.freeDrawingBrush.width = Number(val); $widthLabel.text(val); + $widthLabel.text("width: " + $width.val()) createCursor(); + console.log("change size") }; updateBrushWidth(); @@ -108,8 +110,11 @@ window.canvas = canvas; var val = $opacity.val(); brush.opacity = Number(val); canvas.freeDrawingBrush.color = Colors.hex2rgba(brush.color, brush.opacity); - $opacityLabel.text(val); + $opacityLabel.text(val) + $opacityLabel.text("opacity: " + $opacity.val()); createCursor(); + console.log("change opacity") + console.log("opacity: " + $opacity.val()) }; updateBrushOpacity();