mirror of
https://github.com/moodle/moodle.git
synced 2025-04-25 10:26:17 +02:00
MDL-65484 assign: Scrolling overflow CSS
Use relatively positioned elements, not absolutely positioned to prevent elements being visible when they are scrolled outside the containing drawing region.
This commit is contained in:
parent
09cbe51999
commit
5bda066caa
mod/assign/feedback/editpdf/yui
build/moodle-assignfeedback_editpdf-editor
moodle-assignfeedback_editpdf-editor-debug.jsmoodle-assignfeedback_editpdf-editor-min.jsmoodle-assignfeedback_editpdf-editor.js
src/editor/js
@ -1576,8 +1576,9 @@ Y.extend(ANNOTATIONSTAMP, M.assignfeedback_editpdf.annotation, {
|
||||
|
||||
position = this.editor.get_window_coordinates(new M.assignfeedback_editpdf.point(this.x, this.y));
|
||||
node = Y.Node.create('<div/>');
|
||||
// If these are absolutely positioned, they escape their scroll container.
|
||||
node.setStyles({
|
||||
'position': 'absolute',
|
||||
'position': 'relative',
|
||||
'display': 'inline-block',
|
||||
'backgroundImage': 'url(' + this.editor.get_stamp_image_url(this.path) + ')',
|
||||
'width': (this.endx - this.x),
|
||||
@ -2587,7 +2588,7 @@ var COMMENT = function(editor, gradeid, pageno, x, y, width, colour, rawtext) {
|
||||
});
|
||||
|
||||
drawingregion.append(container);
|
||||
container.setStyle('position', 'absolute');
|
||||
container.setStyle('position', 'relative');
|
||||
container.setX(position.x);
|
||||
container.setY(position.y);
|
||||
drawable.store_position(container, position.x, position.y);
|
||||
|
File diff suppressed because one or more lines are too long
@ -1576,8 +1576,9 @@ Y.extend(ANNOTATIONSTAMP, M.assignfeedback_editpdf.annotation, {
|
||||
|
||||
position = this.editor.get_window_coordinates(new M.assignfeedback_editpdf.point(this.x, this.y));
|
||||
node = Y.Node.create('<div/>');
|
||||
// If these are absolutely positioned, they escape their scroll container.
|
||||
node.setStyles({
|
||||
'position': 'absolute',
|
||||
'position': 'relative',
|
||||
'display': 'inline-block',
|
||||
'backgroundImage': 'url(' + this.editor.get_stamp_image_url(this.path) + ')',
|
||||
'width': (this.endx - this.x),
|
||||
@ -2587,7 +2588,7 @@ var COMMENT = function(editor, gradeid, pageno, x, y, width, colour, rawtext) {
|
||||
});
|
||||
|
||||
drawingregion.append(container);
|
||||
container.setStyle('position', 'absolute');
|
||||
container.setStyle('position', 'relative');
|
||||
container.setX(position.x);
|
||||
container.setY(position.y);
|
||||
drawable.store_position(container, position.x, position.y);
|
||||
|
@ -49,8 +49,9 @@ Y.extend(ANNOTATIONSTAMP, M.assignfeedback_editpdf.annotation, {
|
||||
|
||||
position = this.editor.get_window_coordinates(new M.assignfeedback_editpdf.point(this.x, this.y));
|
||||
node = Y.Node.create('<div/>');
|
||||
// If these are absolutely positioned, they escape their scroll container.
|
||||
node.setStyles({
|
||||
'position': 'absolute',
|
||||
'position': 'relative',
|
||||
'display': 'inline-block',
|
||||
'backgroundImage': 'url(' + this.editor.get_stamp_image_url(this.path) + ')',
|
||||
'width': (this.endx - this.x),
|
||||
|
@ -204,7 +204,7 @@ var COMMENT = function(editor, gradeid, pageno, x, y, width, colour, rawtext) {
|
||||
});
|
||||
|
||||
drawingregion.append(container);
|
||||
container.setStyle('position', 'absolute');
|
||||
container.setStyle('position', 'relative');
|
||||
container.setX(position.x);
|
||||
container.setY(position.y);
|
||||
drawable.store_position(container, position.x, position.y);
|
||||
|
Loading…
x
Reference in New Issue
Block a user