Lines Matching defs:this

7 /// Make sure to invoke this class's constructor with "new" prepended

10 /// It has following event handlers that can be assigned as this object's method.
14 /// browser. Use this event to update list of locally saved figures.
431 if(checkVertexHandle(this))
436 if(this.selectPointShape !== selectobj[n] || i < this.selectPointIdx || this.selectPointIdx + 1 < i)
463 if(0 <= menuno) // If we are clicking on a menu button, ignore this event
700 // Sometimes the user wants to make a non-smooth path, so this functionality can be
970 shape === this.selectPointShape && i === this.selectPointIdx ? '#7f7fff' : '#7f7f7f');
973 if(shape !== this.selectPointShape || i < this.selectPointIdx || this.selectPointIdx + 1 < i)
990 this.tool = "line";
991 this.color = "black";
992 this.width = 1;
993 this.points = [];
1005 for (var i=0; i<this.points.length; i++){
1007 // Prepend control points if this vertex has them.
1008 if("cx" in this.points[i] && "cy" in this.points[i])
1009 dat += this.points[i].cx+","+this.points[i].cy+",";
1010 if("dx" in this.points[i] && "dy" in this.points[i])
1011 dat += this.points[i].dx+","+this.points[i].dy+",";
1012 dat += this.points[i].x+","+this.points[i].y;
1015 type: this.tool,
1020 set_default(alldat, "color", this.color, "black");
1021 set_default(alldat, "width", this.width, 1);
1030 this.color = obj.color || "black";
1031 this.width = obj.width || 1;
1050 this.points = arr;
1057 for(var j = 0; j < this.points.length; j++){
1058 var x = this.points[j].x;
1063 var y = this.points[j].y;
1075 Shape.call(this);
1086 return {minx: this.points[0].x, miny: this.points[0].y,
1087 maxx: this.points[0].x + width, maxy: this.points[0].y + height};
1093 Shape.call(this);
1094 this.text = "";
1095 this.link = "";
1100 var alldat = Shape.prototype.serialize.call(this);
1101 alldat.text = this.text;
1102 if(this.link) alldat.link = this.link; // Do not serialize blank URL
1107 Shape.prototype.deserialize.call(this, obj);
1108 if (undefined !== obj.text) this.text = obj.text;
1109 if(undefined !== obj.link) this.link = obj.link;
1117 var height = this.width === 1 ? 14 : this.width === 2 ? 16 : 20;
1120 var width = ctx.measureText(this.text).width;
1122 return {minx: this.points[0].x, miny: this.points[0].y - height,
1123 maxx: this.points[0].x + width, maxy: this.points[0].y};
1128 if("link" in this && this.link){
1129 location.href = this.link;
1138 Shape.call(this);
1144 var alldat = Shape.prototype.serialize.call(this);
1146 for (var i=0; i<this.points.length; i++){
1147 var pt = this.points[i];
1150 // Prepend control points if this vertex has them.
1154 src += this.points[i-1].x+","+this.points[i-1].y+" ";
1169 if("arrow" in this)
1170 alldat.arrow = set2seq(this.arrow);
1176 Shape.prototype.deserialize.call(this, obj);
1178 this.arrow = seq2set(obj.arrow);
1212 this.points = arr;
1244 this.loadData = function(value){
1256 this.saveAsImage = function(img){
1274 this.loadLocal = function(name){
1316 this.listServer = downloadList;
1318 this.requestServerFile = function(item, hash){
1359 this.requestServerFileHistory = function(item, responseCallback){
1465 this.saveLocal = function(name){
1473 if(newEntry && ('onLocalChange' in this) && this.onLocalChange)
1474 this.onLocalChange();
1482 this.listLocal = function() {
1490 // If we'd repeat this procedure, we may be able to use a shim in:
1534 // this 'new' is important in case obj is user-defined class which was created by
1574 var createXMLHttpRequest = this.createXMLHttpRequest;
1580 this.postData = function(fname, target, requestDelete){
1607 this.pull = function(remoteName){
1628 this.push = function(remoteName){
1655 /// SVG or canvas graphics libraries like EaselJS would do this sort of thing
1658 this.minx = minx;
1659 this.miny = miny;
1660 this.maxx = maxx;
1661 this.maxy = maxy;
1662 this.ondraw = ondraw;
1663 this.onclick = onclick;
1668 this.text = i18n.t(text);
1669 this.onclick = onclick;
1818 this.name = name;
1819 this.points = points || 1;
1820 this.objctor = params && params.objctor || Shape;
1821 this.drawTool = params && params.drawTool;
1822 mixin(this, params);
1826 toolmap[name] = this;
1964 Tool.prototype.mouseUp.call(this, e);
1990 Tool.prototype.mouseUp.call(this, e);
1996 if(this.selectPointShape && this.selectPointShape.tool === "path" && 0 <= this.selectPointIdx){
1998 if(this.selectPointShape.points.length <= 2){
1999 deleteShapes([this.selectPointShape]);
2000 this.selectPointShape = null;
2003 this.selectPointShape.points.splice(this.selectPointIdx, 1);
2270 var textTool = this;
2290 // to keep track of the input element after this function is exited.
2482 // before this function.
2514 this.onNewShape(obj);
2549 // Remember mouse stat to this (Path tool) object for later use
2551 this.lastx = mx;
2552 this.lasty = my;
2553 this.lastPoint = cur_shape.points[cur_shape.points.length-1];
2562 if(this.lastPoint){
2563 var pt = this.lastPoint;
2589 this.lastPoint = null;
2664 // A pseudo-this pointer that can be used in private methods.
2665 // Private methods mean local functions in this constructor, which
2666 // don't share this pointer with the constructor itself unless the
2667 // form "function.call(this)" is used.
2668 var self = this;