Skip to content

Commit 479209d

Browse files
committed
Support borders
1 parent 1076e77 commit 479209d

5 files changed

Lines changed: 443 additions & 2 deletions

File tree

build/CommentCoreLibrary.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,7 @@ var __extends = this.__extends || function (d, b) {
233233
__.prototype = b.prototype;
234234
d.prototype = new __();
235235
};
236+
236237
var CoreComment = (function () {
237238
function CoreComment(parent, init) {
238239
if (typeof init === "undefined") { init = {}; }
@@ -342,6 +343,9 @@ var CoreComment = (function () {
342343
this.color = this._color;
343344
}
344345
this.shadow = this._shadow;
346+
if (this._border) {
347+
this.border = this._border;
348+
}
345349
if (this._font !== "") {
346350
this.font = this._font;
347351
}
@@ -587,6 +591,8 @@ var CoreComment = (function () {
587591
}
588592
if (this.dur - this.ttl > this._motionEnd[this._curMotion]) {
589593
this._curMotion++;
594+
this.animate();
595+
return;
590596
} else {
591597
var currentMotion = this.motion[this._curMotion];
592598
var time = (this.dur - Math.max(this.ttl, 0)) - this._motionStart[this._curMotion];

build/CommentCoreLibrary.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/core/Comment.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ var __extends = this.__extends || function (d, b) {
44
__.prototype = b.prototype;
55
d.prototype = new __();
66
};
7+
78
var CoreComment = (function () {
89
function CoreComment(parent, init) {
910
if (typeof init === "undefined") { init = {}; }
@@ -113,6 +114,9 @@ var CoreComment = (function () {
113114
this.color = this._color;
114115
}
115116
this.shadow = this._shadow;
117+
if (this._border) {
118+
this.border = this._border;
119+
}
116120
if (this._font !== "") {
117121
this.font = this._font;
118122
}
@@ -358,6 +362,8 @@ var CoreComment = (function () {
358362
}
359363
if (this.dur - this.ttl > this._motionEnd[this._curMotion]) {
360364
this._curMotion++;
365+
this.animate();
366+
return;
361367
} else {
362368
var currentMotion = this.motion[this._curMotion];
363369
var time = (this.dur - Math.max(this.ttl, 0)) - this._motionStart[this._curMotion];

src/core/Comment.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
/**
2+
* Basic Comment Abstraction
3+
* Built on DOM actions
4+
*/
15
interface CCLOptions {
26
globalScale:number;
37
scrollScale:number;
@@ -169,6 +173,9 @@ class CoreComment implements IComment {
169173
this.color = this._color;
170174
}
171175
this.shadow = this._shadow;
176+
if (this._border) {
177+
this.border = this._border;
178+
}
172179
if (this._font !== "") {
173180
this.font = this._font;
174181
}
@@ -365,7 +372,9 @@ class CoreComment implements IComment {
365372
return;
366373
}
367374
if(this.dur - this.ttl > this._motionEnd[this._curMotion]){
368-
this._curMotion ++;
375+
this._curMotion++;
376+
this.animate();
377+
return;
369378
}else{
370379
var currentMotion = this.motion[this._curMotion];
371380
var time = (this.dur - Math.max(this.ttl,0)) - this._motionStart[this._curMotion];

0 commit comments

Comments
 (0)