Commit e06832b5 authored by Nezael's avatar Nezael
Browse files

Merge branch '192-changer-la-couleur-du-texte' into paperboard

parents 974540c7 04f52c8c
......@@ -13,9 +13,9 @@ ui-sref="project.workshops.overview">{{::_labels.disconnectWorkshopBtn}}
<canvas id="drawZone" width="500" height="500" style="border: thin solid black; margin: 0 auto"></canvas>
<div id="commands">
<input type="color" name="personnalized-color" id="personnalized-color">
<button>Black</button>
<button>Blue</button>
<button>Red</button>
<button ng-click="paperBoardCtrl.blackPaint()">Black</button>
<button ng-click="paperBoardCtrl.bluePaint()">Blue</button>
<button ng-click="paperBoardCtrl.redPaint()">Red</button>
<button>Cursor</button>
<button ng-click="paperBoardCtrl.penMode()">Pen</button>
<button>Circle</button>
......
......@@ -103,4 +103,29 @@ root.controller('PaperBoardCtrl', ['$scope', '$stateParams', '$http', '$state',
{
isDrawing = false;
});
document.querySelector('#personnalized-color').addEventListener('change', e =>
{
style = document.querySelector('#personnalized-color').value;
})
paperBoardCtrl.blackPaint = function ()
{
style = "#000";
document.querySelector('#personnalized-color').value = "#000";
}
paperBoardCtrl.bluePaint = function ()
{
style = "#0000FF";
document.querySelector('#personnalized-color').value = "#0000FF";
}
paperBoardCtrl.redPaint = function ()
{
style = "#FF0000";
document.querySelector('#personnalized-color').value = "#FF0000";
}
}]);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment