Closed sfranzyshen closed 5 years ago
Ah, looks like a 'this' issue since the call is within a parent function. It has to be set via variable instead.
I've updated the wiki to account for it.
arrive:function(){
var dom = this.dom;
LCARS.helper.viewportZoom(dom, {width:1440, height:1080});
window.addEventListener("resize", function(){
LCARS.helper.viewportZoom(dom, {width:1440, height:1080});
});
}
Once again Brilliant! that did it ;)
I'm trying to implement viewportZoom. I'm using the example give on the wiki ... but i get the error ...
Uncaught TypeError: Cannot read property 'css' of undefined at Object.viewportZoom
here is the code where it's being setup ... in my module.js fileand the line(s) in the sdk ...
the error(s) only occur during the resize eventListener call ... it works fine when called from the arrive call ... seems this.dom behaves differently depending on who calls it ... a promise or event ...