Gitlab CSE Unil
Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
M. Chardon
moodle-assignfeedback_editpdfplus
Commits
4af7dbd0
Commit
4af7dbd0
authored
Dec 12, 2016
by
M. Chardon
Browse files
correction bug sauver après clickoutside
parent
2e7ee676
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
yui/build/moodle-assignfeedback_editpdfplus-editor/moodle-assignfeedback_editpdfplus-editor-debug.js
View file @
4af7dbd0
...
...
@@ -1436,8 +1436,8 @@ Y.extend(ANNOTATION, Y.Base, {
this
.
oldx
=
point
.
x
;
this
.
oldy
=
point
.
y
;
/*var divcartridge = this.editor.get_dialogue_element('#' + this.divcartridge + "_cartridge");
divcartridge.on('mousemove', this.move_cartridge_continue, this);
divcartridge.on('mouseup', this.move_cartridge_stop, this);*/
divcartridge.on('mousemove', this.move_cartridge_continue, this);
divcartridge.on('mouseup', this.move_cartridge_stop, this);*/
canvas
.
on
(
'
mousemove
'
,
this
.
move_cartridge_continue
,
this
);
canvas
.
on
(
'
mouseup
'
,
this
.
move_cartridge_stop
,
this
);
},
...
...
@@ -1469,8 +1469,8 @@ Y.extend(ANNOTATION, Y.Base, {
e
.
preventDefault
();
/*var divcartridge = this.editor.get_dialogue_element('#' + this.divcartridge + "_cartridge");
divcartridge.detach('mousemove', this.move_cartridge_continue, this);
divcartridge.detach('mouseup', this.move_cartridge_stop, this);*/
divcartridge.detach('mousemove', this.move_cartridge_continue, this);
divcartridge.detach('mouseup', this.move_cartridge_stop, this);*/
var
canvas
=
this
.
editor
.
get_dialogue_element
(
SELECTOR
.
DRAWINGCANVAS
);
//var drawingcanvas = this.editor.get_dialogue_element(SELECTOR.DRAWINGCANVAS);
canvas
.
detach
(
'
mousemove
'
,
this
.
move_cartridge_continue
,
this
);
...
...
@@ -1478,7 +1478,7 @@ Y.extend(ANNOTATION, Y.Base, {
//var canvas = this.editor.get_dialogue_element(SELECTOR.DRAWINGCANVAS),
var
clientpoint
=
new
M
.
assignfeedback_editpdfplus
.
point
(
e
.
clientX
+
canvas
.
get
(
'
docScrollX
'
),
e
.
clientY
+
canvas
.
get
(
'
docScrollY
'
)),
e
.
clientY
+
canvas
.
get
(
'
docScrollY
'
)),
point
=
this
.
editor
.
get_canvas_coordinates
(
clientpoint
);
var
offsetcanvas
=
this
.
editor
.
get_dialogue_element
(
SELECTOR
.
DRAWINGCANVAS
).
getXY
();
...
...
@@ -1581,7 +1581,7 @@ Y.extend(ANNOTATION, Y.Base, {
input
.
set
(
'
focus
'
,
'
on
'
);
}
this
.
disabled_canvas_event
();
divprincipale
.
on
(
'
clickoutside
'
,
this
.
save_annot
,
this
,
'
clickoutside
'
);
divprincipale
.
on
(
'
clickoutside
'
,
this
.
save_annot
_clickout
,
this
,
'
clickoutside
'
);
}
},
/**
...
...
@@ -1596,6 +1596,12 @@ Y.extend(ANNOTATION, Y.Base, {
}
this
.
save_annot
(
unputtext
);
},
save_annot_clickout
:
function
(
e
,
clickType
)
{
if
(
!
(
clickType
===
'
clickoutside
'
&&
this
.
editor
.
currentannotation
===
this
))
{
this
.
save_annot
(
null
);
}
return
;
},
/**
* save text annotation
* @param {string} result
...
...
@@ -1694,8 +1700,8 @@ Y.extend(ANNOTATION, Y.Base, {
}
if
(
divprincipale
)
{
divprincipale
.
setStyle
(
'
z-index
'
,
1
);
divprincipale
.
detach
();
if
(
this
.
editor
.
get
(
'
readonly
'
))
{
divprincipale
.
detach
();
divprincipale
.
on
(
'
click
'
,
this
.
view_annot
,
this
,
'
click
'
);
}
}
...
...
yui/build/moodle-assignfeedback_editpdfplus-editor/moodle-assignfeedback_editpdfplus-editor-min.js
View file @
4af7dbd0
This diff is collapsed.
Click to expand it.
yui/build/moodle-assignfeedback_editpdfplus-editor/moodle-assignfeedback_editpdfplus-editor.js
View file @
4af7dbd0
...
...
@@ -1436,8 +1436,8 @@ Y.extend(ANNOTATION, Y.Base, {
this
.
oldx
=
point
.
x
;
this
.
oldy
=
point
.
y
;
/*var divcartridge = this.editor.get_dialogue_element('#' + this.divcartridge + "_cartridge");
divcartridge.on('mousemove', this.move_cartridge_continue, this);
divcartridge.on('mouseup', this.move_cartridge_stop, this);*/
divcartridge.on('mousemove', this.move_cartridge_continue, this);
divcartridge.on('mouseup', this.move_cartridge_stop, this);*/
canvas
.
on
(
'
mousemove
'
,
this
.
move_cartridge_continue
,
this
);
canvas
.
on
(
'
mouseup
'
,
this
.
move_cartridge_stop
,
this
);
},
...
...
@@ -1469,8 +1469,8 @@ Y.extend(ANNOTATION, Y.Base, {
e
.
preventDefault
();
/*var divcartridge = this.editor.get_dialogue_element('#' + this.divcartridge + "_cartridge");
divcartridge.detach('mousemove', this.move_cartridge_continue, this);
divcartridge.detach('mouseup', this.move_cartridge_stop, this);*/
divcartridge.detach('mousemove', this.move_cartridge_continue, this);
divcartridge.detach('mouseup', this.move_cartridge_stop, this);*/
var
canvas
=
this
.
editor
.
get_dialogue_element
(
SELECTOR
.
DRAWINGCANVAS
);
//var drawingcanvas = this.editor.get_dialogue_element(SELECTOR.DRAWINGCANVAS);
canvas
.
detach
(
'
mousemove
'
,
this
.
move_cartridge_continue
,
this
);
...
...
@@ -1478,7 +1478,7 @@ Y.extend(ANNOTATION, Y.Base, {
//var canvas = this.editor.get_dialogue_element(SELECTOR.DRAWINGCANVAS),
var
clientpoint
=
new
M
.
assignfeedback_editpdfplus
.
point
(
e
.
clientX
+
canvas
.
get
(
'
docScrollX
'
),
e
.
clientY
+
canvas
.
get
(
'
docScrollY
'
)),
e
.
clientY
+
canvas
.
get
(
'
docScrollY
'
)),
point
=
this
.
editor
.
get_canvas_coordinates
(
clientpoint
);
var
offsetcanvas
=
this
.
editor
.
get_dialogue_element
(
SELECTOR
.
DRAWINGCANVAS
).
getXY
();
...
...
@@ -1581,7 +1581,7 @@ Y.extend(ANNOTATION, Y.Base, {
input
.
set
(
'
focus
'
,
'
on
'
);
}
this
.
disabled_canvas_event
();
divprincipale
.
on
(
'
clickoutside
'
,
this
.
save_annot
,
this
,
'
clickoutside
'
);
divprincipale
.
on
(
'
clickoutside
'
,
this
.
save_annot
_clickout
,
this
,
'
clickoutside
'
);
}
},
/**
...
...
@@ -1596,6 +1596,12 @@ Y.extend(ANNOTATION, Y.Base, {
}
this
.
save_annot
(
unputtext
);
},
save_annot_clickout
:
function
(
e
,
clickType
)
{
if
(
!
(
clickType
===
'
clickoutside
'
&&
this
.
editor
.
currentannotation
===
this
))
{
this
.
save_annot
(
null
);
}
return
;
},
/**
* save text annotation
* @param {string} result
...
...
@@ -1694,8 +1700,8 @@ Y.extend(ANNOTATION, Y.Base, {
}
if
(
divprincipale
)
{
divprincipale
.
setStyle
(
'
z-index
'
,
1
);
divprincipale
.
detach
();
if
(
this
.
editor
.
get
(
'
readonly
'
))
{
divprincipale
.
detach
();
divprincipale
.
on
(
'
click
'
,
this
.
view_annot
,
this
,
'
click
'
);
}
}
...
...
yui/src/editor/js/annotation.js
View file @
4af7dbd0
...
...
@@ -888,8 +888,8 @@ Y.extend(ANNOTATION, Y.Base, {
this
.
oldx
=
point
.
x
;
this
.
oldy
=
point
.
y
;
/*var divcartridge = this.editor.get_dialogue_element('#' + this.divcartridge + "_cartridge");
divcartridge.on('mousemove', this.move_cartridge_continue, this);
divcartridge.on('mouseup', this.move_cartridge_stop, this);*/
divcartridge.on('mousemove', this.move_cartridge_continue, this);
divcartridge.on('mouseup', this.move_cartridge_stop, this);*/
canvas
.
on
(
'
mousemove
'
,
this
.
move_cartridge_continue
,
this
);
canvas
.
on
(
'
mouseup
'
,
this
.
move_cartridge_stop
,
this
);
},
...
...
@@ -921,8 +921,8 @@ Y.extend(ANNOTATION, Y.Base, {
e
.
preventDefault
();
/*var divcartridge = this.editor.get_dialogue_element('#' + this.divcartridge + "_cartridge");
divcartridge.detach('mousemove', this.move_cartridge_continue, this);
divcartridge.detach('mouseup', this.move_cartridge_stop, this);*/
divcartridge.detach('mousemove', this.move_cartridge_continue, this);
divcartridge.detach('mouseup', this.move_cartridge_stop, this);*/
var
canvas
=
this
.
editor
.
get_dialogue_element
(
SELECTOR
.
DRAWINGCANVAS
);
//var drawingcanvas = this.editor.get_dialogue_element(SELECTOR.DRAWINGCANVAS);
canvas
.
detach
(
'
mousemove
'
,
this
.
move_cartridge_continue
,
this
);
...
...
@@ -930,7 +930,7 @@ Y.extend(ANNOTATION, Y.Base, {
//var canvas = this.editor.get_dialogue_element(SELECTOR.DRAWINGCANVAS),
var
clientpoint
=
new
M
.
assignfeedback_editpdfplus
.
point
(
e
.
clientX
+
canvas
.
get
(
'
docScrollX
'
),
e
.
clientY
+
canvas
.
get
(
'
docScrollY
'
)),
e
.
clientY
+
canvas
.
get
(
'
docScrollY
'
)),
point
=
this
.
editor
.
get_canvas_coordinates
(
clientpoint
);
var
offsetcanvas
=
this
.
editor
.
get_dialogue_element
(
SELECTOR
.
DRAWINGCANVAS
).
getXY
();
...
...
@@ -1033,7 +1033,7 @@ Y.extend(ANNOTATION, Y.Base, {
input
.
set
(
'
focus
'
,
'
on
'
);
}
this
.
disabled_canvas_event
();
divprincipale
.
on
(
'
clickoutside
'
,
this
.
save_annot
,
this
,
'
clickoutside
'
);
divprincipale
.
on
(
'
clickoutside
'
,
this
.
save_annot
_clickout
,
this
,
'
clickoutside
'
);
}
},
/**
...
...
@@ -1048,6 +1048,12 @@ Y.extend(ANNOTATION, Y.Base, {
}
this
.
save_annot
(
unputtext
);
},
save_annot_clickout
:
function
(
e
,
clickType
)
{
if
(
!
(
clickType
===
'
clickoutside
'
&&
this
.
editor
.
currentannotation
===
this
))
{
this
.
save_annot
(
null
);
}
return
;
},
/**
* save text annotation
* @param {string} result
...
...
@@ -1146,8 +1152,8 @@ Y.extend(ANNOTATION, Y.Base, {
}
if
(
divprincipale
)
{
divprincipale
.
setStyle
(
'
z-index
'
,
1
);
divprincipale
.
detach
();
if
(
this
.
editor
.
get
(
'
readonly
'
))
{
divprincipale
.
detach
();
divprincipale
.
on
(
'
click
'
,
this
.
view_annot
,
this
,
'
click
'
);
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment