aboutsummaryrefslogtreecommitdiff
path: root/js/components/tools-properties
diff options
context:
space:
mode:
authorJose Antonio Marquez2012-06-28 18:39:07 -0700
committerJose Antonio Marquez2012-06-28 18:39:07 -0700
commit4bfc0b9221734c75f305dbeefe8e49a9d73b766b (patch)
treeca8f43d9c1e332454246ea5b64e6ccc9b3c91bd6 /js/components/tools-properties
parent2f1ad000aeda418696d6ed74202db5e6565ab671 (diff)
downloadninja-4bfc0b9221734c75f305dbeefe8e49a9d73b766b.tar.gz
Relocating code
I added the fix in the wrong location before, this is more proper, still needs to be moved to where the video element is created or added to the DOM (in this spot the event is added every time src is changed).
Diffstat (limited to 'js/components/tools-properties')
-rwxr-xr-xjs/components/tools-properties/tag-properties.reel/tag-properties.js14
1 files changed, 0 insertions, 14 deletions
diff --git a/js/components/tools-properties/tag-properties.reel/tag-properties.js b/js/components/tools-properties/tag-properties.reel/tag-properties.js
index f14183e0..ab745049 100755
--- a/js/components/tools-properties/tag-properties.reel/tag-properties.js
+++ b/js/components/tools-properties/tag-properties.reel/tag-properties.js
@@ -54,7 +54,6 @@ var TagProperties = exports.TagProperties = Montage.create(ToolProperties, {
54 this.divElement.addEventListener("click", this, false); 54 this.divElement.addEventListener("click", this, false);
55 this.imageElement.addEventListener("click", this, false); 55 this.imageElement.addEventListener("click", this, false);
56 this.videoElement.addEventListener("click", this, false); 56 this.videoElement.addEventListener("click", this, false);
57 this.videoElement.addEventListener("canplay", this, false);
58 this.canvasElement.addEventListener("click", this, false); 57 this.canvasElement.addEventListener("click", this, false);
59 this.customElement.addEventListener("click", this, false); 58 this.customElement.addEventListener("click", this, false);
60 } 59 }
@@ -100,19 +99,6 @@ var TagProperties = exports.TagProperties = Montage.create(ToolProperties, {
100 } 99 }
101 } 100 }
102 }, 101 },
103
104 handleCanplay: {
105 value: function (e) {
106 //TODO: Figure out why the video must be seeked to the end before pausing
107 var time = Math.ceil(this.duration);
108 //Trying to display the last frame (doing minus 2 seconds if long video)
109 if (time > 2) this.currentTime = time - 2;
110 else if (time > 1) this.currentTime = time - 1;
111 else this.currentTime = time || 0;
112 //Pauing video
113 this.pause();
114 }
115 },
116 102
117 _selectedElement: { 103 _selectedElement: {
118 value: "div", enumerable: false 104 value: "div", enumerable: false