Jeff Craig![]()
Magnifier is a node plugin meant to be attached to img nodes to provide a window that zooms into that section of the image. It can be configured so that the viewport is either statically placed on the page, or it will follow the mouse pointer around the page.
The configuration object supports the following options:
Styling is applied through the class .yui3-magnifier-display which applies to the external bounding box of the viewport. When you leave the image, the style .yui3-magnifier-hidden is applied to this bounding box.
<script src="http://yui.yahooapis.com/3.3.0/build/yui/yui-min.js"></script>YUI({
//Last Gallery Build of this module
gallery: 'gallery-2012.12.05-21-01'
}).use('node', 'gallery-magnifier', function(Y) {
Y.one('#magnify-follow').plug(Y.Magnifier, {
follow: true,
height: 75,
width: 75,
zoom: 3
});
Y.one('#magnify-static').plug(Y.Magnifier, {
follow: false,
staticX: 750,
staticY: 240,
height: 150,
width: 150,
zoom: 4
});
});| Subject | Author | Date |
|---|---|---|
| Two issues with "magnifier" | Michael Hasenstein | 04/1/10 |
© 2006-2013 Yahoo! Inc. All rights reserved.
All code on this site is licensed under the BSD License unless stated otherwise.
About This Site · Security Contact Info