Giter Club home page Giter Club logo

Comments (8)

whatnickcodes avatar whatnickcodes commented on June 20, 2024

That makes perfect sense. Unfortunately, you should read this: https://code.google.com/p/chromium/issues/detail?id=20574 regarding it.

In short, webkit transforms and fixed positions don't work nicely yet. Although 3D Transforms work in modern browsers, there are still bugs (hence the prefix meaning it isn't 100% ready yet). I read up on this a lot, and the way transforms are mapped will make it real hard for this to even ever work together in the future (see: http://stackoverflow.com/questions/15194313/webkit-css-transform3d-position-fixed-issue).

Transforms do work on fixed elements, just not when the parent container is fixed. If you check this demo http://panels.scotch.io/demos/javascript-only/index.html there's a way to turn off the use of CSS3 Transforms as the easiest and quickest fix. The only problem is that it's not as performant (smooth) as the transform since the Panel is done via JS instead, but it still works and most websites, I would say, do it this way. That would be a quick and easy solution for you. The alternative is you would need to find creative workarounds like this: http://codepen.io/ncerminara/pen/Acybr and http://codepen.io/ncerminara/pen/fwHjL

If you are getting real custom, you can read this tutorial: http://scotch.io/tutorials/off-canvas-menus-with-css3-transitions-and-transforms and try to learn how it works and come up with your own solution versus using the plugin.

But... I already did that for you 😃! Here's your example with a creative custom workaround done: http://codepen.io/ncerminara/pen/ecDfd.

Lastly, here's probably a better example of what I think you're trying to accomplish: http://codepen.io/ncerminara/pen/rtesj

I hope that helps! Remember these are work arounds and you'll have to test away for browser support and stuff. Check the edits I made to CSS and JS.

You're giving me a lot of valuable feedback Jake! If you're using this for a commercial project, please consider buying a license to support http://scotch.io. http://shop.scotch.io/collections/frontpage/products/scotchpanels-js-commercial-license Thanks!

from scotch-panels.

Jakobud avatar Jakobud commented on June 20, 2024

Thanks for the help. I figured it might be something that wasn't immediately fixable.

from scotch-panels.

Jakobud avatar Jakobud commented on June 20, 2024

Also, yeah I'm planning on using this for a commerical project eventually. When I figure out that using Scotch Panels is definitely the way to go I will most definitely be buying a license. I'm looking over the examples right now figuring out the differences. Also, I'm trying to figure out how you kept the panel fixed to top of the screen as well.

from scotch-panels.

whatnickcodes avatar whatnickcodes commented on June 20, 2024

Thanks. It's moved outside of the wrapper. It's a little tricky how this work-around works. It's basically putting a fixed element at the top (as the nav) and to the side (the panel) that are both outside of the container. Then the panel acts to just move the body

from scotch-panels.

feesh avatar feesh commented on June 20, 2024

Hi there! Noticed this issue still happens for non-mobile view for some reason even though I've added the useCSS: false flag —

screen shot 2015-06-18 at 3 01 32 pm

— shows up while the browser width is > 600px.

from scotch-panels.

feesh avatar feesh commented on June 20, 2024

Oh just kidding, I forgot that was in the CSS for the panel on my end. Maybe make a note about this in the tutorial here: https://panels.scotch.io/demos/side-menu-mobile-only-with-css/index.html ?

from scotch-panels.

pjldesign avatar pjldesign commented on June 20, 2024

Used the API Callbacks to remove the transform and removed completely from plugin (kind of hacky, but...):

$('#mypanel').scotchPanel({
useCSS: true,
containerSelector: 'body',
direction: 'top',
duration: 300,
transition: 'ease',
clickSelector: '.searchBtn',
distanceX: '70%',
enableEscapeKey: true,
beforePanelOpen: function() {
      $('.scotch-panel-canvas').css({
                '-moz-transform': 'translate3d(0, 0, 0)',
                '-ms-transform': 'translate3d(0, 0, 0)',
                '-o-transform': 'translate3d(0, 0, 0)',
                '-webkit-transform': 'translate3d(0, 0, 0)',
                'transform': 'translate3d(0, 0, 0)'
      });
      $("html, body").animate({ scrollTop: 0 }, "slow");
      return false;
    },
afterPanelClose: function() {
        $('.scotch-panel-canvas').css({
                '-moz-transform': '',
                '-ms-transform': '',
                '-o-transform': '',
                '-webkit-transform': '',
                'transform': ''
      });
    }
});

from scotch-panels.

jontarbuck avatar jontarbuck commented on June 20, 2024

Trying to fix the position fixed issue myself, not having any luck with getting the above method working in Chrome - my fixed position div isn't fixed - any help would be appreciated!

from scotch-panels.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.