How to use the ext/splitview/splits.update function in ext

To help you get started, we’ve selected a few ext examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github pylonide / pylon / plugins-client / ext.splitview / splitview.js View on Github external
// then the user may remove the last or first tab from it.
            idx = pages.indexOf(split.pairs[bRight ? splitLen - 1 : 0].page);
        }
        else {
            var currIdx = pages.indexOf(curr);
            idx = currIdx + (bRight ? 1 : -1);
        }
        if (idx < 0 || idx > pages.length - 1)
            return;

        // enable split view ONLY for code editors for now...
        if (!this.isSupportedEditor(curr.$editor, pages[idx].$editor))
            return;
        // pass in null to mutate the active split view
        Splits.mutate(null, pages[idx]);
        Splits.update(Splits.getActive());
        this.save();
        return false;
    },
github pylonide / pylon / client / ext / splitview / splitview.js View on Github external
Splits.get(e.page).forEach(function(split) {
                if (Splits.isActive(split))
                    Splits.update(split);
            });
            _self.save();
github pylonide / pylon / plugins-client / ext.splitview / splitview.js View on Github external
if (split.pairs.length > 1) {
                if (apf.isTrue(node.getAttribute("active")))
                    active = split;
                if (splits.indexOf(split) == -1)
                    splits.push(split);
            }
        }
        Splits.set(splits);

        if (!active || splits.indexOf(active, activePage) == -1) {
            tabs.set(activePage);
        }
        else if (active) {
            //tabs.set(active.pairs[0].page);
            Splits.update(active);
            Splits.show(active);
            mnuSplitAlign.setAttribute("checked", active.gridLayout == "3rows");
            if (active.clone)
                mnuCloneView.setAttribute("checked", true);
        }

        if (!restoreQueue.length)
            restoring = false;
    },
github pylonide / pylon / plugins-client / ext.splitview / splitview.js View on Github external
splits.get(e.page).forEach(function(split) {
                if (splits.isActive(split))
                    splits.update(split);
            });
            _self.save();
github pylonide / pylon / client / ext / splitview / splitview.js View on Github external
fake.setAttribute("model", fake.$model = page.$model);
        
        page.addEventListener("DOMNodeRemovedFromDocument", function(e) {
            if (typeof tabEditors == "undefined" || !fake || !fake.parentNode)
                return;
            tabEditors.remove(fake);
        });
        
        Editors.initEditorEvents(fake, page.$model);
        
        Splits.mutate(null, fake);
        
        split = Splits.get(fake)[0];
        split.clone = fake;
        
        Splits.update(split);
        
        this.save();
        
        return fake;
    },
github pylonide / pylon / plugins-client / ext.splitview / splitview.js View on Github external
tabs.addEventListener("tabselectmouseup", function(e) {
            var page = this.$activepage;
            var split = splits.get(page)[0];
            if (split)
                splits.update(split);
        });
github pylonide / pylon / client / ext / splitview / splitview.js View on Github external
changeLayout: function(page, gridLayout) {
        var split = Splits.get(page)[0];
        if (!split || split.gridLayout == gridLayout)
            return;
        
        Splits.update(split, gridLayout);
        mnuSplitAlign.setAttribute("checked", gridLayout == "3rows");
        this.save();
    },
github pylonide / pylon / plugins-client / ext.splitview / splitview.js View on Github external
changeLayout: function(page, gridLayout) {
        var split = splits.get(page)[0];
        if (!split || split.gridLayout == gridLayout)
            return;

        splits.update(split, gridLayout);
        mnuSplitAlign.setAttribute("checked", gridLayout == "3rows");
        this.save();
    },
github pylonide / pylon / plugins-client / ext.splitview / splitview.js View on Github external
Splits.get(e.page).forEach(function(split) {
                if (Splits.isActive(split))
                    Splits.update(split);
            });
            _self.save();
github pylonide / pylon / client / ext / splitview / splitview.js View on Github external
tabs.addEventListener("tabselectmouseup", function(e) {
            var page = this.$activepage;
            var split = Splits.get(page)[0];
            if (split)
                Splits.update(split);
        });