Coder Social home page Coder Social logo

Comments (3)

motla avatar motla commented on June 18, 2024

Hi Jonathan,

Thanks for your interest on the library.

I'm not sure I understand your question correctly.
You can use CSS properties to position the menu floating on the page, for example using the properties position:fixed and width: 100%. If you want it at the top, add: top: 0; left: 0. At the bottom bottom: 0; left: 0.
You can use style bindings with Vue.js to place the menu automatically depending of your application.
If you want to center the items of the menu, you can add spacers, like:

content: [
  { is: "spacer" },
  { text: "It is" },
  { text: "centered!" },
  { is: "spacer" }
]

Does it answer your question?

from vue-file-toolbar-menu.

jonathanzuniga avatar jonathanzuniga commented on June 18, 2024

For example, to automatically position the menu if you open it and it gets clipped by the viewport bounds, like: https://popper.js.org/

from vue-file-toolbar-menu.

motla avatar motla commented on June 18, 2024

Hmm ok I got it.

it would be nice to have an option to where you prefer the float menu to show: top, right, bottom, left.

For now you can set "align-left"(default), "align-center", or "align-right" to the menu_class property of the menu element (see API.md)
You can also create your own CSS class to apply to the menu. What you are trying to achieve could work using CSS position: sticky, but it needs some experiments (I did all positioning in simple CSS for this lib).

Otherwise it would be feasible in Javascript with popper.js, applying it to the menu elements using either the menu_id properties, or document.querySelectorAll(...) with the correct path.

from vue-file-toolbar-menu.

Related Issues (16)

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.