GithubHelp home page GithubHelp logo

jinjor / elm-contextmenu Goto Github PK

View Code? Open in Web Editor NEW
16.0 16.0 5.0 266 KB

Flexible context menu for Elm

Home Page: http://package.elm-lang.org/packages/jinjor/elm-contextmenu/latest

License: BSD 3-Clause "New" or "Revised" License

Elm 100.00%
context-menu contextmenu elm elm-contextmenu

elm-contextmenu's People

Contributors

cjmeeks avatar jinjor avatar torii-y avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

elm-contextmenu's Issues

Remove unused code

During my work on #6 I have seen that some of your code is never used. Please fix this:

  1. src/Styles.elm line 95: The disabled flag is never used in your code.
    annotation : Color -> Float -> Float -> Bool -> Style msg
    annotation color annotationHeight fontSize disabled =
        [ style "margin-top" "-2px"
        , style "line-height" (px annotationHeight)
        , style "font-size" (px fontSize)
        , style "color" color
        ]
  2. src/Styles.elm line 117: The borderWidth setting is never used.
    partition : Float -> Float -> Style msg
    partition borderWidth margin =
        [ style "border-bottom-style" "solid"
        , style "border-bottom-width" (px 1)
        , style "border-bottom-color" borderColor
        , style "border-top" "none"
        , style "margin" (px margin ++ " 0")
        ]
  3. src/ContextMenu.elm line 42 and 49: The imports Browser and Process are never used in your code. You can safely remove them.

Add option for left click menu

Great work, thank you !

I've had to modify you code in this line:
github.com/jinjor/elm-contextmenu/blob/master/src/ContextMenu.elm#L521

"contextmenu"-->"click"

Because I needed the menu to open on left click.

Position fixed

I needed to change the position: fixed style to position: absolute for it to work correctly.
Just so you know ๐Ÿ˜‰ I think it has something to do with the scroll position?

PS. Thanks for this library!

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.