MCPcopy
hub / github.com/jabbany/CommentCoreLibrary / CoreComment

Class CoreComment

src/core/Comment.ts:10–500  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8/// <reference path='Core.d.ts' />
9/// <reference path='CommentUtils.ts' />
10class CoreComment implements IComment {
11 public static LINEAR:Function = function (t:number, b:number, c:number, d:number):number {
12 return t * c / d + b;
13 };
14
15 public mode:number = 1;
16 public stime:number = 0;
17 public text:string = '';
18 public ttl:number = 4000;
19 public dur:number = 4000;
20 public cindex:number = -1;
21
22 public motion:Array<Object> = [];
23 public movable:boolean = true;
24
25 private _curMotion:number;
26 private _motionStart:Array<number>;
27 private _motionEnd:Array<number>;
28 private _alphaMotion:Object = null;
29
30 public _x:number;
31 public _y:number;
32
33 /**
34 * Absolute coordinates. Use absolute coordinates if true otherwise use percentages.
35 * @type {boolean} use absolute coordinates or not (default true)
36 */
37 public absolute:boolean = true;
38 /**
39 * Alignment
40 * @type {number} 0=tl, 2=bl, 1=tr, 3=br
41 */
42 public align:number = 0;
43 /**
44 * Axis
45 * @type {number} 0=dr, 1=dl, 2=ur, 3=ul
46 */
47 public axis:number = 0;
48
49 public _alpha:number = 1;
50 public _size:number = 25;
51 private _width:number;
52 private _height:number;
53 private _color:number = 0xffffff;
54 private _border:boolean = false;
55 private _shadow:boolean = true;
56 private _font:string = '';
57 private _transform:CommentUtils.Matrix3D = null;
58
59 public parent:ICommentManager;
60 public dom:HTMLDivElement;
61
62 constructor(parent:ICommentManager, init:Object = {}) {
63 if (!parent) {
64 throw new Error('Comment not bound to comment manager.');
65 } else {
66 this.parent = parent;
67 }

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected