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

positionHint doesn't position correctly under some condition #14

Open
ssshake opened this issue Nov 7, 2018 · 0 comments
Open

positionHint doesn't position correctly under some condition #14

ssshake opened this issue Nov 7, 2018 · 0 comments
Assignees

Comments

@ssshake
Copy link

ssshake commented Nov 7, 2018

Please refer to this video where I try to demonstrate.

https://youtu.be/dnR4OyGekqs

So I'm generating a bunch of windows dynamically on page load in a v-for


        <hsc-window-style-metal v-for="app in apps" :key="app.title">
            <hsc-window ... />

And I toggle the visibility of the windows based on :isOpen but also a v-if to prevent the iframes content running in the background. I've experimented with using both or either of these and that doesn't seem to affect the behavior I'm reporting


:isOpen="app.state.isOpen" 

v-if="app.state.isRunning"

And on mouse click of the 'taskbar' I created I toggle isOpen (etc) using this method


        startAppByName(name){
            let appIndex = this.apps.findIndex((app) => {
                return app.title === name;
            })
            if (appIndex <= -1){
                console.err('No app found by name' + name)
                return;
            }
            this.apps[appIndex].state.isFocused = true;
            this.apps[appIndex].state.isOpen = true;
            this.apps[appIndex].state.isRunning = true;

        },

The strange behavior is the hintPosition is off (seen in video pushed to the right), but the correct hint position gets applied AFTER opening the next window. This is quite confusing to me.

What is also strange is instead of setting isOpen dynamically (on taskbar click), if i just hardcode the windows to isOpen on page load they launch and are positioned correctly.

@michitaro michitaro self-assigned this Nov 8, 2018
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