Gitlab CSE Unil

Commit 95f803b2 authored by M. Chardon's avatar M. Chardon
Browse files

documentation javascript

parent 5f129657
define(["jquery","./annotation"],function(a,b){function c(){return b.call(this),this}return c.prototype=Object.create(b.prototype),c.prototype.initAdminDemo=function(a,c){b.prototype.initAdminDemo.call(this,a,c),this.x=60,this.y=100},c.prototype.draw=function(b){if(b){var c="<div id='"+this.id+"'></div>";b.append(c),a("#"+this.id).css("position","relative"),a("#"+this.id).css("top",this.y),a("#"+this.id).css("left",this.x),a("#"+this.id).css("color",this.colour),a("#"+this.id).css("border","2px solid "+this.colour),a("#"+this.id).css("padding","0 2px"),a("#"+this.id).css("display","inline-block"),a("#"+this.id).append(this.tooltype.label)}return this},c});
\ No newline at end of file
define(["jquery","./annotation"],function(a,b){function c(){return b.call(this),this}return c.prototype=Object.create(b.prototype),c.prototype.initAdminDemo=function(a){b.prototype.initAdminDemo.call(this,a),this.x=60,this.y=100},c.prototype.draw=function(b){if(b){var c="<div id='"+this.id+"'></div>";b.append(c),a("#"+this.id).css("position","relative"),a("#"+this.id).css("top",this.y),a("#"+this.id).css("left",this.x),a("#"+this.id).css("color",this.colour),a("#"+this.id).css("border","2px solid "+this.colour),a("#"+this.id).css("padding","0 2px"),a("#"+this.id).css("display","inline-block"),a("#"+this.id).append(this.tooltype.label)}return this},c});
\ No newline at end of file
......@@ -19,9 +19,17 @@
*/
/**
* @module mod_assignfeedback_editpdfplus/annotationframe
* @param {Jquery} $
* @param {Annotation} Annotation super-class
* @returns {AnnotationFrame} annotation frame
*/
define(['jquery', './annotation'],
function ($, Annotation) {
/********************************
* CONSTRUCTOR and EXTEND-CLASS *
********************************/
// I return an initialized object.
function AnnotationFrame() {
// Call the super constructor.
......@@ -32,6 +40,14 @@ define(['jquery', './annotation'],
// The Friend class extends the base Model class.
AnnotationFrame.prototype = Object.create(Annotation.prototype);
/*************
* FUNCTIONS *
*************/
/**
* Init the annotation with demo parameters
* @param {Tool} currentTool
*/
AnnotationFrame.prototype.initAdminDemo = function (currentTool) {
Annotation.prototype.initAdminDemo.call(this, currentTool);
this.x = 279;
......@@ -42,6 +58,10 @@ define(['jquery', './annotation'],
this.colour = "#FF0000";
};
/**
* Init a child-annotation with demo parameters
* @param {Annotation} annotationparent
*/
AnnotationFrame.prototype.initChildAdminDemo = function (annotationparent) {
Annotation.prototype.initAdminDemo.call(this, annotationparent.tooltype);
this.x = 144;
......@@ -52,11 +72,10 @@ define(['jquery', './annotation'],
this.id = 'previsu_annot_child';
this.colour = "#FF0000";
};
/**
* Draw a highlight annotation
* @protected
* @method draw
* @return M.assignfeedback_editpdfplus.drawable
* Draw the annotation
* @param {JQuery Entity} canevas
*/
AnnotationFrame.prototype.draw = function (canevas) {
//this.shape_id = 'ct_frame_' + (new Date().toJSON()).replace(/:/g, '').replace(/\./g, '');
......@@ -67,7 +86,6 @@ define(['jquery', './annotation'],
$("#" + this.id).css('height', this.endy - this.y);
$("#" + this.id).css('border', 'solid 2px red');
$("#" + this.id).css('position', 'relative');
//$("#" + this.id).css('display', 'inline-block');
$("#" + this.id).css('left', this.x);
$("#" + this.id).css('top', this.y);
$("#" + this.id).css('box-sizing', 'inherit');
......@@ -75,8 +93,10 @@ define(['jquery', './annotation'],
this.draw_catridge(canevas);
return this;
};
/**
* Display cartridge and toolbox for the annotation
* @param {JQuery Entity} canevas
* @returns {Boolean} res
*/
AnnotationFrame.prototype.draw_catridge = function (canevas) {
......
......@@ -19,9 +19,17 @@
*/
/**
* @module mod_assignfeedback_editpdfplus/annotationhighlightplus
* @param {Jquery} $
* @param {Annotation} Annotation super-class
* @returns {AnnotationHighlightplus} annotation highlight plus
*/
define(['jquery', './annotation'],
function ($, Annotation) {
/********************************
* CONSTRUCTOR and EXTEND-CLASS *
********************************/
// I return an initialized object.
function AnnotationHighlightplus() {
// Call the super constructor.
......@@ -32,6 +40,14 @@ define(['jquery', './annotation'],
// The Friend class extends the base Model class.
AnnotationHighlightplus.prototype = Object.create(Annotation.prototype);
/*************
* FUNCTIONS *
*************/
/**
* Init the annotation with demo parameters
* @param {Tool} currentTool
*/
AnnotationHighlightplus.prototype.initAdminDemo = function (currentTool) {
Annotation.prototype.initAdminDemo.call(this, currentTool);
this.x = 83;
......@@ -40,10 +56,8 @@ define(['jquery', './annotation'],
this.endy = 100;
};
/**
* Draw a highlight annotation
* @protected
* @method draw
* @return M.assignfeedback_editpdfplus.drawable
* Draw the annotation
* @param {JQuery Entity} canevas
*/
AnnotationHighlightplus.prototype.draw = function (canevas) {
if (canevas) {
......@@ -54,7 +68,6 @@ define(['jquery', './annotation'],
$("#" + this.id).css('height', this.endy - this.y);
$("#" + this.id).css('opacity', .5);
$("#" + this.id).css('position', 'relative');
//$("#" + this.id).css('display', 'inline-block');
$("#" + this.id).css('left', this.x);
$("#" + this.id).css('top', this.y);
}
......@@ -65,6 +78,7 @@ define(['jquery', './annotation'],
};
/**
* Display cartridge and toolbox for the annotation
* @param {JQuery Entity} canevas
* @returns {Boolean} res
*/
AnnotationHighlightplus.prototype.draw_catridge = function (canevas) {
......
......@@ -19,9 +19,17 @@
*/
/**
* @module mod_assignfeedback_editpdfplus/annotationstampcomment
* @param {Jquery} $
* @param {Annotation} Annotation super-class
* @returns {AnnotationStampcomment} annotation stamp comment
*/
define(['jquery', './annotation'],
function ($, Annotation) {
/********************************
* CONSTRUCTOR and EXTEND-CLASS *
********************************/
// I return an initialized object.
function AnnotationStampcomment() {
// Call the super constructor.
......@@ -32,6 +40,14 @@ define(['jquery', './annotation'],
// The Friend class extends the base Model class.
AnnotationStampcomment.prototype = Object.create(Annotation.prototype);
/*************
* FUNCTIONS *
*************/
/**
* Init the annotation with demo parameters
* @param {Tool} currentTool
*/
AnnotationStampcomment.prototype.initAdminDemo = function (currentTool) {
Annotation.prototype.initAdminDemo.call(this, currentTool);
this.x = 188;
......@@ -39,10 +55,8 @@ define(['jquery', './annotation'],
this.displayrotation = 1;
};
/**
* Draw a highlight annotation
* @protected
* @method draw
* @return M.assignfeedback_editpdfplus.drawable
* Draw the annotation
* @param {JQuery Entity} canevas
*/
AnnotationStampcomment.prototype.draw = function (canevas) {
if (canevas) {
......@@ -58,7 +72,6 @@ define(['jquery', './annotation'],
var divStampComment = "<div id='" + this.id + "'>" + fleche + "</div>";
canevas.append(divStampComment);
$("#" + this.id).css('position', 'relative');
//$("#" + this.id).css('display', 'inline-block');
$("#" + this.id).css('left', this.x);
$("#" + this.id).css('top', this.y);
}
......@@ -69,6 +82,7 @@ define(['jquery', './annotation'],
};
/**
* Display cartridge and toolbox for the annotation
* @param {JQuery Entity} canevas
* @returns {Boolean} res
*/
AnnotationStampcomment.prototype.draw_catridge = function (canevas) {
......
......@@ -19,9 +19,17 @@
*/
/**
* @module mod_assignfeedback_editpdfplus/annotationstampplus
* @param {Jquery} $
* @param {Annotation} Annotation super-class
* @returns {AnnotationStampplus} annotation stamp plus
*/
define(['jquery', './annotation'],
function ($, Annotation) {
/********************************
* CONSTRUCTOR and EXTEND-CLASS *
********************************/
// I return an initialized object.
function AnnotationStampplus() {
// Call the super constructor.
......@@ -32,16 +40,22 @@ define(['jquery', './annotation'],
// The Friend class extends the base Model class.
AnnotationStampplus.prototype = Object.create(Annotation.prototype);
AnnotationStampplus.prototype.initAdminDemo = function (currentTool, typetoolEntity) {
Annotation.prototype.initAdminDemo.call(this, currentTool, typetoolEntity);
/*************
* FUNCTIONS *
*************/
/**
* Init the annotation with demo parameters
* @param {Tool} currentTool
*/
AnnotationStampplus.prototype.initAdminDemo = function (currentTool) {
Annotation.prototype.initAdminDemo.call(this, currentTool);
this.x = 60;
this.y = 100;
};
/**
* Draw a highlight annotation
* @protected
* @method draw
* @return M.assignfeedback_editpdfplus.drawable
* Draw the annotation
* @param {JQuery Entity} canevas
*/
AnnotationStampplus.prototype.draw = function (canevas) {
if (canevas) {
......
......@@ -19,6 +19,9 @@
*/
/**
* @module mod_assignfeedback_editpdfplus/annotationverticalline
* @param {Jquery} $
* @param {Annotation} Annotation super-class
* @returns {AnnotationVerticalline} annotation vertical line
*/
define(['jquery', './annotation'],
function ($, Annotation) {
......@@ -52,7 +55,7 @@ define(['jquery', './annotation'],
this.endy = 175;
};
/**
* Draw a highlight annotation
* Draw the annotation
* @param {JQuery Entity} canevas
*/
AnnotationVerticalline.prototype.draw = function (canevas) {
......
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