Gitlab CSE Unil

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

correction curseur fct de l'outil

parent 49bc6e52
......@@ -5015,7 +5015,7 @@ EDITOR.prototype = {
* @method refresh_button_state
*/
refresh_button_state: function () {
var currenttoolnode, drawingregion;
var currenttoolnode, drawingregion, drawingcanvas;
this.refresh_button_color_state();
......@@ -5030,6 +5030,21 @@ EDITOR.prototype = {
}
drawingregion = this.get_dialogue_element(SELECTOR.DRAWINGREGION);
drawingregion.setAttribute('data-currenttool', this.currentedit.tool);
drawingcanvas = this.get_dialogue_element(SELECTOR.DRAWINGCANVAS);
switch (this.currentedit.tool) {
case 'drag':
drawingcanvas.setStyle('cursor', 'move');
break;
case 'highlight':
drawingcanvas.setStyle('cursor', 'text');
break;
case 'select':
drawingcanvas.setStyle('cursor', 'default');
break;
default:
drawingcanvas.setStyle('cursor', 'crosshair');
}
},
/**
......@@ -5662,9 +5677,6 @@ EDITOR.prototype = {
if (tool !== "select" && tool !== "drag") {
this.lastannotationtool = tool;
drawingregion.setStyle('cursor', 'crosshair');
} else if (tool === "drag") {
drawingregion.setStyle('cursor', 'move');
}
if (tool !== "select") {
......
......@@ -5015,7 +5015,7 @@ EDITOR.prototype = {
* @method refresh_button_state
*/
refresh_button_state: function () {
var currenttoolnode, drawingregion;
var currenttoolnode, drawingregion, drawingcanvas;
this.refresh_button_color_state();
......@@ -5030,6 +5030,21 @@ EDITOR.prototype = {
}
drawingregion = this.get_dialogue_element(SELECTOR.DRAWINGREGION);
drawingregion.setAttribute('data-currenttool', this.currentedit.tool);
drawingcanvas = this.get_dialogue_element(SELECTOR.DRAWINGCANVAS);
switch (this.currentedit.tool) {
case 'drag':
drawingcanvas.setStyle('cursor', 'move');
break;
case 'highlight':
drawingcanvas.setStyle('cursor', 'text');
break;
case 'select':
drawingcanvas.setStyle('cursor', 'default');
break;
default:
drawingcanvas.setStyle('cursor', 'crosshair');
}
},
/**
......@@ -5662,9 +5677,6 @@ EDITOR.prototype = {
if (tool !== "select" && tool !== "drag") {
this.lastannotationtool = tool;
drawingregion.setStyle('cursor', 'crosshair');
} else if (tool === "drag") {
drawingregion.setStyle('cursor', 'move');
}
if (tool !== "select") {
......
......@@ -236,7 +236,7 @@ EDITOR.prototype = {
* @method refresh_button_state
*/
refresh_button_state: function () {
var currenttoolnode, drawingregion;
var currenttoolnode, drawingregion, drawingcanvas;
this.refresh_button_color_state();
......@@ -251,6 +251,21 @@ EDITOR.prototype = {
}
drawingregion = this.get_dialogue_element(SELECTOR.DRAWINGREGION);
drawingregion.setAttribute('data-currenttool', this.currentedit.tool);
drawingcanvas = this.get_dialogue_element(SELECTOR.DRAWINGCANVAS);
switch (this.currentedit.tool) {
case 'drag':
drawingcanvas.setStyle('cursor', 'move');
break;
case 'highlight':
drawingcanvas.setStyle('cursor', 'text');
break;
case 'select':
drawingcanvas.setStyle('cursor', 'default');
break;
default:
drawingcanvas.setStyle('cursor', 'crosshair');
}
},
/**
......@@ -883,9 +898,6 @@ EDITOR.prototype = {
if (tool !== "select" && tool !== "drag") {
this.lastannotationtool = tool;
drawingregion.setStyle('cursor', 'crosshair');
} else if (tool === "drag") {
drawingregion.setStyle('cursor', 'move');
}
if (tool !== "select") {
......
Supports Markdown
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