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

Maximize and Minimize Options #7

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

andreMariano90
Copy link

Created Maximize and Minimize Options. Also added offset for top and right, so when maximized, you can maximize it under a toolbar for example.

Also, on every resize event, I had to call the window.resize so components, like echarts, can resize itself. I added a 1 sec timeout so the command is not dispatched everytime.

@michitaro
Copy link
Owner

Thank you very much for the PR.
I checked your branch locally, but found some odd behavior like
(This occurred after clicking minimize button.)
screenshot

This is what I did.

git clone [email protected]:andreMariano90/vue-window.git
cd vue-window
npm install
npm run example-server &
open http://localhost:8080/

Could you check the examples work fine again?

@andreMariano90
Copy link
Author

Ok. I got it, the problem is the overflow config. It only works if the overflow=auto. I will try to update the style on runtime

@ssshake
Copy link

ssshake commented Oct 26, 2018

any update on this I'd like to make use of it but considering rolling my own. Unrelated maybe but I was wondering if we could just have slots for the title bar, I would like to add an icon and other custom buttons for various actions, but that's hard to do without replacing the titlebar

@ssshake
Copy link

ssshake commented Oct 26, 2018

nevermind after looking through the code I see there is a slot for title so in that case I would simple put all of my custom buttons and icon in to children of that slot.

So you could so something like this


                <template slot="title">
                    <img :src="app.icon" class="icon-title">
                    <span>{{app.title}}</span>
                    <span class="title-buttons">
                        <span class="title-button button-refresh" @click="refreshWindow(app)"><font-awesome-icon icon="redo-alt" /></span>
                        <span class="title-button button-maximie" @click="toggleMaximize(app)"><font-awesome-icon icon="window-maximize" /></span>
                    </span>
                </template>


@hybridwebdev
Copy link

I'd like to weigh in and say that this functionality doesn't really belong in core code, as you can easily implement this yourself. Seems very use-case specific.

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

Successfully merging this pull request may close these issues.

4 participants