Skip to content
This repository was archived by the owner on Mar 7, 2018. It is now read-only.
This repository was archived by the owner on Mar 7, 2018. It is now read-only.

Disable the dragging? #94

Closed
Closed

Description

@jShaf

I see that gridster js got disable method however I could not yet figured out how to disable the dragging here. :/

Appreciate any help/pointer. Thanks.

Activity

  1. jShaf commented on Apr 1, 2013

    @jShaf
    Author

    Looks like this does the trick, $(".gridster ul:first").gridster().data('gridster').disable()

  2. jasonblewis commented on Jun 6, 2013

    @jasonblewis

    which file do you put that in?

  3. dcollazo commented on Jul 2, 2014

    @dcollazo

    I disabled dragging by adding an 'items' parameter at the end of assets/javascripts/application.coffee:

      draggable:
        stop: Dashing.showGridsterInstructions
        start: -> Dashing.currentWidgetPositions = Dashing.getWidgetPositions()
        items: "none"
    

    the 'items' parameter takes a string that matches to a CSS selector. It can also take a a collection of HTML elements. Only matching elements will be draggable. You can pass any string, so long as it doesn't match any of your widgets. In this case, no elements are matching, which means that drag isn't enabled for anything.

  4. trianglegrrl commented on Apr 15, 2015

    @trianglegrrl

    Thanks @dcollazo - now it doesn't drive me mental when I use a smaller tablet! The items trick totally worked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions