os-js / osjs-widgets

OS.js Widgets Module
https://manual.os-js.org/v3/
2 stars 4 forks source link

keep widget fixed in the upper right corner #19

Closed yoyosaygood closed 2 years ago

yoyosaygood commented 2 years ago

I hope my widget fixed in the upper right corner(It's best not allowed to move and hide if ),how can i do this?

andersevenrud commented 2 years ago

It's been very long since I used this, but I think you can do this in your widget:

  constructor(core, options) {
    super(core, options, {
      dimension: {
        width: 300,
        height: 50
      },
      position: {
        top: 100,
        right: 100
      }
    }, { });
  }

However this will probably still allow the user to move it. If you want to be able to lock this then a new feature is needed here (which would be very simple to implement).

andersevenrud commented 2 years ago

Closing this because of lack of response.