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

Fixed Position of Aloha Toolbar #814

Open
StefanKern opened this issue Nov 19, 2012 · 1 comment
Open

Fixed Position of Aloha Toolbar #814

StefanKern opened this issue Nov 19, 2012 · 1 comment
Labels

Comments

@StefanKern
Copy link

Hi,

I think in an earlier version, this functionallity was already implemented, but now I can't find them anymore.

However it should be pretty easy to add this to getPinState() in floating.js. From what I have seen, this function is only alled from Toolbar.init().

    /**
     * Retreive the persisted pinned position of the FloatingMenu surface.
     * The pinned Position is defined by the 
     *      1. FloatingMenue settings
     *      2. The last pinned Position (if no 1.)
     *
     * @return {object}
     */
    function getPinState() {

        //SK edit: Added Function to position Toolbar
        if (typeof Aloha === 'object' &&
            typeof Aloha.settings === 'object' &&
            typeof Aloha.settings.FloatingMenue === 'object') {

            return Aloha.settings.FloatingMenue;
        }
        else if (amplifyStore.store('Aloha.FloatingMenu.pinned') === 'true') {
            return {
                top: parseInt(amplifyStore.store('Aloha.FloatingMenu.top'), 10),
                left: parseInt(amplifyStore.store('Aloha.FloatingMenu.left'), 10),
                isPinned: true
            };
        } else 
        return {
            top: null,
            left: null,
            isPinned: false
        };
    }
@evo42
Copy link
Member

evo42 commented Dec 18, 2012

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

No branches or pull requests

3 participants