summaryrefslogtreecommitdiff
path: root/public/assets/javascripts/rectangles/engine/scenery
diff options
context:
space:
mode:
authorJules Laplace <jules@okfoc.us>2014-09-30 02:13:29 -0400
committerJules Laplace <jules@okfoc.us>2014-09-30 02:13:29 -0400
commit6ba3c656827c8e1fa84724c6b5dc2ba4f0991ffe (patch)
tree3959a14e110857ac2c88a344949f24fdb3fe42ca /public/assets/javascripts/rectangles/engine/scenery
parenta8d3a30892687f58e3f18b768104ea54480cd465 (diff)
parent4a0717d5f8aa0ff3378ff589b106cd35c0586367 (diff)
merge
Diffstat (limited to 'public/assets/javascripts/rectangles/engine/scenery')
-rw-r--r--public/assets/javascripts/rectangles/engine/scenery/types/video.js12
1 files changed, 9 insertions, 3 deletions
diff --git a/public/assets/javascripts/rectangles/engine/scenery/types/video.js b/public/assets/javascripts/rectangles/engine/scenery/types/video.js
index e8bc7f7..ef25d8d 100644
--- a/public/assets/javascripts/rectangles/engine/scenery/types/video.js
+++ b/public/assets/javascripts/rectangles/engine/scenery/types/video.js
@@ -10,14 +10,20 @@ Scenery.types.video = Scenery.types.base.extend(function(base){
this.build()
this.bind()
-
+
if (opt.data) {
+ if (opt.wall) {
+ var position = opt.wall.mxToPosition(opt.data.position)
+ opt.index = opt.wall.surface.index_for_x( position.a, 0 )
+ }
+ this.set_wall(opt)
this.deserialize(opt.data)
}
else {
- this.recenter()
+ this.set_wall(opt)
+ this.bounds && this.recenter()
}
- },
+ },
build: function(){
switch (this.media.type) {