repo: janusweb
action: commit
revision: 
path_from: 
revision_from: 40ab6dc195f29ae6b0831d8e20998c06f8bf5b5d:
path_to: 
revision_to: 
git.thebackupbox.net
janusweb
git clone git://git.thebackupbox.net/janusweb
commit 40ab6dc195f29ae6b0831d8e20998c06f8bf5b5d
Author: James Baicoianu 
Date:   Tue Aug 8 17:46:52 2017 -0700

    Fixed devicePixelRatio for websurfaces

diff --git a/scripts/websurface.js b/scripts/websurface.js
index bb5e3cf612451c247cf426ab84e19997576322e9..
index ..4f6d1634a787cc1073a63c54d5ab1ab60c6d9348 100644
--- a/scripts/websurface.js
+++ b/scripts/websurface.js
@@ -4,6 +4,7 @@ elation.require(['engine.things.generic'], function() {
       elation.engine.things.januswebsurface.extendclass.postinit.call(this);
       this.defineProperties({
         websurface_id: { type: 'string' },
+        image_id: { type: 'string' },
         color: { type: 'color', default: 0xffffff },
         hovercolor: { type: 'color', default: 0x009900 },
         activecolor: { type: 'color', default: 0x00ff00 }
@@ -89,7 +90,7 @@ elation.require(['engine.things.generic'], function() {
           iframe.style.height = height + 'px';

           var obj = new THREE.CSS3DObject(div);
-          obj.scale.set(1/width, 1/height, 1);
+          obj.scale.set(1/width / devicePixelRatio, 1/height / devicePixelRatio, 1);

           this.iframe = iframe;
           this.domobj = obj;

-----END OF PAGE-----