Coder Social home page Coder Social logo

Prop to disable dragging about vue-visual HOT 3 OPEN

bkwld avatar bkwld commented on June 15, 2024
Prop to disable dragging

from vue-visual.

Comments (3)

weotch avatar weotch commented on June 15, 2024

What's the CSS solution you've found to work? In vue-ssr-carousel I do this:

https://github.com/BKWLD/vue-ssr-carousel/blob/1c1509d8eb56887e526f9cf9f70c449400639cbd/src/concerns/dragging.coffee#L236-L244

from vue-visual.

sjstark avatar sjstark commented on June 15, 2024

I wanted to avoid JS and use HTML or CSS. Best solution would be to use html imo, but my css solution was just using user-drag

/* Prevent dragging of thumbnails */
>>> img
    -webkit-user-drag none
    -khtml-user-drag none
    -moz-user-drag none
    -o-user-drag none
    user-drag none

from vue-visual.

weotch avatar weotch commented on June 15, 2024

Cool, yeah, if you wanna make a PR for this I'd accept it. I like no-drag (which is what vue-ssr-carousel uses) or prevent-dragging for the prop name because I prefer boolean props that default to false. Also, I think you can just do user-drag none and autoprefixer will automatically add vendor prefixes.

from vue-visual.

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.