1
0
Fork 0
forked from 0x2620/oxjs

replace Flipbook with VideoPreview

This commit is contained in:
rlx 2011-08-08 13:58:19 +00:00
commit d21068979a
5 changed files with 139 additions and 104 deletions

View file

@ -47,8 +47,8 @@ Ox.load('UI', {debug: true}, function() {
openpreview: function(event) {
var data = Ox.getObjectById($list.options('items'), event.ids[0]),
ratio = data.width / data.height,
windowWidth = window.innerWidth * 0.8
windowHeight = window.innerHeight * 0.8
windowWidth = window.innerWidth * 0.8,
windowHeight = window.innerHeight * 0.8,
windowRatio = windowWidth / windowHeight,
width = Math.round(ratio > windowRatio ? windowWidth : windowHeight * ratio),
height = Math.round(ratio < windowRatio ? windowHeight : windowWidth / ratio);