@lijuhong1981/jsgif 1.0.7 → 1.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +4 -31
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -553,58 +553,43 @@ function GifPlayer(options = {}) {
|
|
|
553
553
|
value: loadData,
|
|
554
554
|
},
|
|
555
555
|
loadUrl: {
|
|
556
|
-
configurable: true,
|
|
557
|
-
writable: true,
|
|
558
556
|
value: loadUrl,
|
|
559
557
|
},
|
|
560
558
|
play: {
|
|
561
|
-
configurable: true,
|
|
562
|
-
writable: true,
|
|
563
559
|
value: playGif,
|
|
564
560
|
},
|
|
565
561
|
pause: {
|
|
566
|
-
configurable: true,
|
|
567
|
-
writable: true,
|
|
568
562
|
value: pauseGif,
|
|
569
563
|
},
|
|
570
564
|
stop: {
|
|
571
|
-
configurable: true,
|
|
572
|
-
writable: true,
|
|
573
565
|
value: stopGif,
|
|
574
566
|
},
|
|
575
567
|
canvas: {
|
|
576
|
-
configurable: true,
|
|
577
568
|
get: function () {
|
|
578
569
|
return CANVAS;
|
|
579
570
|
},
|
|
580
571
|
},
|
|
581
572
|
atlasCanvas: {
|
|
582
|
-
configurable: true,
|
|
583
573
|
get: function () {
|
|
584
574
|
return ATLAS_CANVAS;
|
|
585
575
|
},
|
|
586
576
|
},
|
|
587
577
|
frameWidth: {
|
|
588
|
-
configurable: true,
|
|
589
578
|
get: function () {
|
|
590
579
|
return CANVAS.width;
|
|
591
580
|
}
|
|
592
581
|
},
|
|
593
582
|
frameHeight: {
|
|
594
|
-
configurable: true,
|
|
595
583
|
get: function () {
|
|
596
584
|
return CANVAS.height;
|
|
597
585
|
}
|
|
598
586
|
},
|
|
599
587
|
framesNumber: {
|
|
600
|
-
configurable: true,
|
|
601
588
|
get: function () {
|
|
602
589
|
return FRAME_LIST.length;
|
|
603
590
|
}
|
|
604
591
|
},
|
|
605
592
|
currentFrameIndex: {
|
|
606
|
-
configurable: true,
|
|
607
|
-
writable: true,
|
|
608
593
|
set: function (value) {
|
|
609
594
|
if (!FRAME_LIST[value])
|
|
610
595
|
throw new Error('illegal index: ' + value);
|
|
@@ -615,14 +600,11 @@ function GifPlayer(options = {}) {
|
|
|
615
600
|
}
|
|
616
601
|
},
|
|
617
602
|
frameList: {
|
|
618
|
-
configurable: true,
|
|
619
603
|
get: function () {
|
|
620
604
|
return FRAME_LIST;
|
|
621
605
|
}
|
|
622
606
|
},
|
|
623
607
|
reverse: {
|
|
624
|
-
configurable: true,
|
|
625
|
-
writable: true,
|
|
626
608
|
set: function (value) {
|
|
627
609
|
Check.typeOf.bool('reverse', value);
|
|
628
610
|
options.reverse = value;
|
|
@@ -632,8 +614,6 @@ function GifPlayer(options = {}) {
|
|
|
632
614
|
}
|
|
633
615
|
},
|
|
634
616
|
timeScale: {
|
|
635
|
-
configurable: true,
|
|
636
|
-
writable: true,
|
|
637
617
|
set: function (value) {
|
|
638
618
|
Check.typeOf.number.greaterThan('timeScale', value, 0);
|
|
639
619
|
options.timeScale = value;
|
|
@@ -643,8 +623,6 @@ function GifPlayer(options = {}) {
|
|
|
643
623
|
}
|
|
644
624
|
},
|
|
645
625
|
onFrameChanged: {
|
|
646
|
-
configurable: true,
|
|
647
|
-
writable: true,
|
|
648
626
|
set: function (value) {
|
|
649
627
|
options.onFrameChanged = value;
|
|
650
628
|
},
|
|
@@ -652,20 +630,15 @@ function GifPlayer(options = {}) {
|
|
|
652
630
|
return options.onFrameChanged;
|
|
653
631
|
}
|
|
654
632
|
},
|
|
655
|
-
isDestroyed: {
|
|
656
|
-
configurable: true,
|
|
657
|
-
writable: true,
|
|
658
|
-
value: function () {
|
|
659
|
-
return false;
|
|
660
|
-
},
|
|
661
|
-
},
|
|
662
633
|
destroy: {
|
|
663
|
-
configurable: true,
|
|
664
|
-
writable: true,
|
|
665
634
|
value: destroyGif,
|
|
666
635
|
},
|
|
667
636
|
});
|
|
668
637
|
|
|
638
|
+
player.isDestroyed = function () {
|
|
639
|
+
return false;
|
|
640
|
+
};
|
|
641
|
+
|
|
669
642
|
return player;
|
|
670
643
|
};
|
|
671
644
|
|