cameronmcefee / plax

JQuery powered parallaxing
http://www.cameronmcefee.com/plax
MIT License
2.28k stars 206 forks source link

Ender/Jeesh support is broken #42

Open magebarf opened 11 years ago

magebarf commented 11 years ago

As mentioned in my previous pull requests, I did notice that Ender (Jeesh) support is currently broken.

I've noticed a few places where things are not working as intended, and I thought I'd outline them here;

        var marginLeft = layer.obj.css('margin-left') || '0px'
        var marginTop = layer.obj.css('margin-top') || '0px'

        marginLeft = marginLeft.match(/^((-?\d+)\s*px|0+\s*%|left)$/)
        marginTop = marginTop.match(/^((-?\d+)\s*px|0+\s*%|top)$/)

        marginLeft = marginLeft ? parseFloat(marginLeft[2]) : 0
        marginTop = marginTop ? parseFloat(marginTop[2]) : 0

        // Figure out where the element is positioned, then reposition it from the top/left
        var position = { left : this.offsetLeft - marginLeft, top : this.offsetTop - marginTop }

All in all, the issues with running Plax with Ender / Jeesh / Bonzo instead of jQuery could be fixed, but I believe that there at least needs to be a few fixes incorporated in Bonzo and the Ender Bridge before it would be worth the time.

My suggestion is to currently remove Ender from the documentation, only promising compatibility with jQuery, while I open up some issues with the Bonzo project instead, and then consider adding it back in the future.

cameronmcefee commented 11 years ago

Sounds like a plan to me. I'll kill the support mention from the docs for now.