Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

This is question not issue #1

Open
minhquan1313 opened this issue Jul 6, 2024 · 2 comments
Open

This is question not issue #1

minhquan1313 opened this issue Jul 6, 2024 · 2 comments

Comments

@minhquan1313
Copy link

Hi dev, I find this library really interesting. I just have a question, do you plan to write an English version with Typescript implement? That would be great! And another question is whether Vanie has any method to prevent dragging window out of view? Like "limitMovement" from windrag library?

@NekoShooter
Copy link
Owner

Yes, I have planned to make the English version, but since I don't know English very well, it will likely have spelling and syntax errors. Regarding the implementation with TypeScript, I haven't considered it yet, but I might make it a priority. As for the function to prevent the window from moving, it doesn't exist, but it's a great idea, so thank you. I'll start working on that method.

I appreciate the feedback, my friend 😉.

@NekoShooter
Copy link
Owner

I will start creating the English version of this library as soon as possible. The method to limit movement, called "limitarMovimiento," has already been created, and I have also submitted a PR on GitHub. For now, on NPM, this method will be included in version 0.0.5 along with the other improvements you mentioned, as well as some additional ones that I am preparing.

import Vanie from "vanie"

const root= document.getElementById('root');

const window_noMove = new Vanie('windows-claro');
const window = new Vanie('linux-oscuro');

window_noMove.padre = window .padre =root;

//true: no move, false: move
window_noMove.limitarMovimiento(true);

window_noMove.abrir();
window.abrir();

window_noMove.lienzo.style.backgroundColor = '#00000077';
window.lienzo.style.backgroundColor = '#059b9add';

gif animado que muestra el resultado del codigo usado en el ejemplo de limitarMovimiento

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants