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.
427 if(checkVertexHandle(this))
432 if(this.selectPointShape !== selectobj[n] || i < this.selectPointIdx || this.selectPointIdx + 1 < i)
459 if(0 <= menuno) // If we are clicking on a menu button, ignore this event
696 // Sometimes the user wants to make a non-smooth path, so this functionality can be
966 shape === this.selectPointShape && i === this.selectPointIdx ? '#7f7fff' : '#7f7f7f');
969 if(shape !== this.selectPointShape || i < this.selectPointIdx || this.selectPointIdx + 1 < i)
986 this.tool = "line";
987 this.color = "black";
988 this.width = 1;
989 this.points = [];
1001 for (var i=0; i<this.points.length; i++){
1003 // Prepend control points if this vertex has them.
1004 if("cx" in this.points[i] && "cy" in this.points[i])
1005 dat += this.points[i].cx+","+this.points[i].cy+",";
1006 if("dx" in this.points[i] && "dy" in this.points[i])
1007 dat += this.points[i].dx+","+this.points[i].dy+",";
1008 dat += this.points[i].x+","+this.points[i].y;
1011 type: this.tool,
1016 set_default(alldat, "color", this.color, "black");
1017 set_default(alldat, "width", this.width, 1);
1026 this.color = obj.color || "black";
1027 this.width = obj.width || 1;
1046 this.points = arr;
1053 for(var j = 0; j < this.points.length; j++){
1054 var x = this.points[j].x;
1059 var y = this.points[j].y;
1071 Shape.call(this);
1082 return {minx: this.points[0].x, miny: this.points[0].y,
1083 maxx: this.points[0].x + width, maxy: this.points[0].y + height};
1089 Shape.call(this);
1090 this.text = "";
1091 this.link = "";
1096 var alldat = Shape.prototype.serialize.call(this);
1097 alldat.text = this.text;
1098 if(this.link) alldat.link = this.link; // Do not serialize blank URL
1103 Shape.prototype.deserialize.call(this, obj);
1104 if (undefined !== obj.text) this.text = obj.text;
1105 if(undefined !== obj.link) this.link = obj.link;
1113 var height = this.width === 1 ? 14 : this.width === 2 ? 16 : 20;
1116 var width = ctx.measureText(this.text).width;
1118 return {minx: this.points[0].x, miny: this.points[0].y - height,
1119 maxx: this.points[0].x + width, maxy: this.points[0].y};
1124 if("link" in this && this.link){
1125 location.href = this.link;
1134 Shape.call(this);
1140 var alldat = Shape.prototype.serialize.call(this);
1142 for (var i=0; i<this.points.length; i++){
1143 var pt = this.points[i];
1146 // Prepend control points if this vertex has them.
1150 src += this.points[i-1].x+","+this.points[i-1].y+" ";
1165 if("arrow" in this)
1166 alldat.arrow = set2seq(this.arrow);
1172 Shape.prototype.deserialize.call(this, obj);
1174 this.arrow = seq2set(obj.arrow);
1208 this.points = arr;
1240 this.loadData = function(value){
1252 this.saveAsImage = function(img){
1270 this.loadLocal = function(name){
1312 this.listServer = downloadList;
1314 this.requestServerFile = function(item, hash){
1355 this.requestServerFileHistory = function(item, responseCallback){
1461 this.saveLocal = function(name){
1469 if(newEntry && ('onLocalChange' in this) && this.onLocalChange)
1470 this.onLocalChange();
1478 this.listLocal = function() {
1486 // If we'd repeat this procedure, we may be able to use a shim in:
1530 // this 'new' is important in case obj is user-defined class which was created by
1570 var createXMLHttpRequest = this.createXMLHttpRequest;
1576 this.postData = function(fname, target, requestDelete){
1603 this.pull = function(remoteName){
1624 this.push = function(remoteName){
1651 /// SVG or canvas graphics libraries like EaselJS would do this sort of thing
1654 this.minx = minx;
1655 this.miny = miny;
1656 this.maxx = maxx;
1657 this.maxy = maxy;
1658 this.ondraw = ondraw;
1659 this.onclick = onclick;
1664 this.text = i18n.t(text);
1665 this.onclick = onclick;
1814 this.name = name;
1815 this.points = points || 1;
1816 this.objctor = params && params.objctor || Shape;
1817 this.drawTool = params && params.drawTool;
1818 mixin(this, params);
1822 toolmap[name] = this;
1960 Tool.prototype.mouseUp.call(this, e);
1986 Tool.prototype.mouseUp.call(this, e);
1992 if(this.selectPointShape && this.selectPointShape.tool === "path" && 0 <= this.selectPointIdx){
1994 if(this.selectPointShape.points.length <= 2){
1995 deleteShapes([this.selectPointShape]);
1996 this.selectPointShape = null;
1999 this.selectPointShape.points.splice(this.selectPointIdx, 1);
2266 var textTool = this;
2286 // to keep track of the input element after this function is exited.
2478 // before this function.
2510 this.onNewShape(obj);
2545 // Remember mouse stat to this (Path tool) object for later use
2547 this.lastx = mx;
2548 this.lasty = my;
2549 this.lastPoint = cur_shape.points[cur_shape.points.length-1];
2558 if(this.lastPoint){
2559 var pt = this.lastPoint;
2585 this.lastPoint = null;
2660 // A pseudo-this pointer that can be used in private methods.
2661 // Private methods mean local functions in this constructor, which
2662 // don't share this pointer with the constructor itself unless the
2663 // form "function.call(this)" is used.
2664 var self = this;