I was trying to follow Bradley Neuberg's instructions to add the event
handler to the DIV containing the object, but I couldn't, as the DIV
is always underneath the object, so the DIV won't catch the mousewheel
event.
I then found a thread (http://www.ozzu.com/website-design-forum/
placing-div-over-flash-t25572.html) that explains how to get the DIV
above the object.
To make this work, I had to change the svg.js code a little.
Like so:
_determineCustomAttrs: function() {
var results = [];
if (this._embedType == 'object') {
var node = this._replaceMe;
var commonObj = document._createElement('object');
for (var j = 0; j < node.attributes.length; j++) {
var attr = node.attributes[j];
var attrName = attr.nodeName;
var attrValue = attr.nodeValue;
if (!attrValue && attrValue !== 'true') {
continue;
}
if (commonObj.getAttribute(attrName)) {
continue;
}
if (/^(id|name|width|height|data|class|style|codebase|type|
_listeners|addEventListener|onload)$/.test(attrName)) {
continue;
}
results.push({attrName: attrName.toString(),
attrValue: attrValue.toString()});
}
}
//added in this line
results.push({attrName: 'wmode', attrValue: 'transparent'});
return results;
},
Looking at the rest of the code, it seems that wmode should already be
transparent, but it wasn't. Once I'd made this change I was able to
capture the mousewheel event as described in Bradley's post.
Regards,
Matt.
--
You received this message because you are subscribed to the Google Groups "SVG Web" group.For more options, visit this group at http://groups.google.com/group/svg-web?hl=en.
To post to this group, send email to svg...@googlegroups.com.
To unsubscribe from this group, send email to svg-web+u...@googlegroups.com.
|
||||