[Plugin: NextGEN Gallery] IE Zoom Level and ImageRotator integration
-
Hi,
i configured sucesfully NextGEN Gallery with Imagerotator.swf in the header of my site.
It’s wonderful but when I change zoom level (in Internet Explorer from 100% to 125% or 150%), the inner image isn’t resized and is showed up empty space…. (or it is cutted if i choose 50%)
The best way I found was dynamically resize the inner image modifying the imagerotator’s width/height parameters, multiplying these by a factor of screen.deviceXDPI/96.I inserted in swfobject.php a single line in the javascript() function (at line 125) before the $this->js .= $this->embedSWF; :
$this->js .= "\n try { this.flashvars.width = this.flashvars.width* (screen.deviceXDPI/96.0); this.flashvars.height = this.flashvars.height* (screen.deviceYDPI/96.0); } catch (e) {};\n";
So the function now is:
function javascript () { //Build javascript $this->js = "\nvar " . $this->id . " = {\n"; $this->js .= $this->add_js_parameters('params', $this->params) . ",\n"; $this->js .= $this->add_js_parameters('flashvars', $this->flashvars) . ",\n"; $this->js .= $this->add_js_parameters('attr', $this->attributes) . ",\n"; $this->js .= "\tstart : function() {" . "\n\t\t"; $this->js .= "\n try { this.flashvars.width = this.flashvars.width* (screen.deviceXDPI/96.0); this.flashvars.height = this.flashvars.height* (screen.deviceYDPI/96.0); } catch (e) {};\n"; $this->js .= $this->embedSWF; $this->js .= "\t}\n}\n"; $this->js .= $this->id . '.start();'; return $this->js; }
So now the images are correcty displayed, when I change the zoom level, but only after a refresh or a navigation action.
Is there any better solution?
https://www.ads-software.com/extend/plugins/nextgen-gallery/
- The topic ‘[Plugin: NextGEN Gallery] IE Zoom Level and ImageRotator integration’ is closed to new replies.