michitaro / vue-window

Window component for vue2
https://github.com/michitaro/vue-window
MIT License
296 stars 59 forks source link

Top/Left not being respected #15

Open ssshake opened 6 years ago

ssshake commented 6 years ago

I can't seem to use top and left in the props, only position hint which I dont fully understand and dont think I want.

I can modify the prop directly via a $ref, then of course vue complains about modifying the prop. But when I do this the window does reposition.

My goal is to be able to set initial window position on load, then, on move, save the position to local storage so that it can be restored on new page load.

image

alekstar79 commented 5 years ago

I have exactly the same problem... but apparently, nothing has changed since then in this matter!

michitaro commented 5 years ago

Could you provide a minimal repository that reproduce the situation?

alekstar79 commented 5 years ago

Could you provide a minimal repository that reproduce the situation?

I can not give a link to the real project, here provided a problematic component, of course the most simplified, but emulating the problem. For the test, you can simply connect the component to any the most basic vue application and try to call it. When working the component is all right, the positioning is synchronized and even at the end the coordinates can be stored somewhere, for example in a local storage. The problem is that when you mount a component, the specified coordinates are not applied. It seems to me that this problem should manifest itself on any instance of the vue-window component. In your examples, it seems there is a positioning of the component using coordinates, but it is not clear how it works. Coordinates are set as null, there are no parameters, no code, but the component is positioned somehow. I will be glad for any help or hint in this matter.

michitaro commented 5 years ago

Thanks. I’ll inspect it.

michitaro commented 5 years ago

The problem will be solved on @2.4.2. @alekstar79 I hope your sample works with the new vue-menu.

clemsos commented 5 years ago

hey @michitaro will v2.4.2 be released?

ra79sta commented 4 years ago

Can someone help me to implement minimize and maximize option in this library. Thank you I see that someone did it..