Gitlab CSE Unil

Commit a7e5d44f authored by M. Chardon's avatar M. Chardon
Browse files

activation automatique des boutons de la barre d'outil

parent 13171f0e
......@@ -31109,21 +31109,6 @@ function($, _, Signal, paper, config, view, io, tools, attributes, Users, export
* @param toolName The name of the activated tool
*/
function onToolActivated(toolName) {
// Ensure that the currently highlighted tool button correspond to the activated tool button.
// This is not the case if the tool is activated by the script and to by a click on the button.
// Change the states accordingly if needed
var currentButton = $("[data-tool-name]").filter("[checked=checked]");
var activatedButton = $("[data-tool-name=" + toolName + "]");
$("[data-tool-name]").button();
if (currentButton.get(0) !== activatedButton.get(0)) {
currentButton
.prop( "checked", false )
.parent(".btn").removeClass("active");
activatedButton
.attr("checked","checked")
.parent(".btn").addClass("active");
}
// Update the cursor class of the canvas element
_canvas
.removeClass(function(i,className){
......@@ -31111,21 +31111,6 @@ function($, _, Signal, paper, config, view, io, tools, attributes, Users, export
* @param toolName The name of the activated tool
*/
function onToolActivated(toolName) {
// Ensure that the currently highlighted tool button correspond to the activated tool button.
// This is not the case if the tool is activated by the script and to by a click on the button.
// Change the states accordingly if needed
var currentButton = $("[data-tool-name]").filter("[checked=checked]");
var activatedButton = $("[data-tool-name=" + toolName + "]");
$("[data-tool-name]").button();
if (currentButton.get(0) !== activatedButton.get(0)) {
currentButton
.prop( "checked", false )
.parent(".btn").removeClass("active");
activatedButton
.attr("checked","checked")
.parent(".btn").addClass("active");
}
// Update the cursor class of the canvas element
_canvas
.removeClass(function(i,className){
......@@ -31109,21 +31109,6 @@ function($, _, Signal, paper, config, view, io, tools, attributes, Users, export
* @param toolName The name of the activated tool
*/
function onToolActivated(toolName) {
// Ensure that the currently highlighted tool button correspond to the activated tool button.
// This is not the case if the tool is activated by the script and to by a click on the button.
// Change the states accordingly if needed
var currentButton = $("[data-tool-name]").filter("[checked=checked]");
var activatedButton = $("[data-tool-name=" + toolName + "]");
$("[data-tool-name]").button();
if (currentButton.get(0) !== activatedButton.get(0)) {
currentButton
.prop( "checked", false )
.parent(".btn").removeClass("active");
activatedButton
.attr("checked","checked")
.parent(".btn").addClass("active");
}
// Update the cursor class of the canvas element
_canvas
.removeClass(function(i,className){
......@@ -31109,21 +31109,6 @@ function($, _, Signal, paper, config, view, io, tools, attributes, Users, export
* @param toolName The name of the activated tool
*/
function onToolActivated(toolName) {
// Ensure that the currently highlighted tool button correspond to the activated tool button.
// This is not the case if the tool is activated by the script and to by a click on the button.
// Change the states accordingly if needed
var currentButton = $("[data-tool-name]").filter("[checked=checked]");
var activatedButton = $("[data-tool-name=" + toolName + "]");
$("[data-tool-name]").button();
if (currentButton.get(0) !== activatedButton.get(0)) {
currentButton
.prop( "checked", false )
.parent(".btn").removeClass("active");
activatedButton
.attr("checked","checked")
.parent(".btn").addClass("active");
}
// Update the cursor class of the canvas element
_canvas
.removeClass(function(i,className){
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