Merge pull request #649 from Kienz/patch-1

Fix `fabric.util.getElementOffset` for Firefox
This commit is contained in:
Juriy Zaytsev 2013-05-25 16:29:32 -07:00
commit 9c1642ac0f

View file

@ -142,7 +142,9 @@
* @return {String} Style attribute value of the given element.
*/
function getElementStyle(element, attr) {
element.style = element.style || { };
if (!element.style) {
element.style = { };
}
if (fabric.document.defaultView && fabric.document.defaultView.getComputedStyle) {
return fabric.document.defaultView.getComputedStyle(element, null)[attr];