Skip to content
This repository has been archived by the owner on Dec 14, 2023. It is now read-only.

What library do you use for editor tabs and rearranging them? #1019

Open
abalter opened this issue Nov 9, 2022 · 1 comment
Open

What library do you use for editor tabs and rearranging them? #1019

abalter opened this issue Nov 9, 2022 · 1 comment
Labels

Comments

@abalter
Copy link

abalter commented Nov 9, 2022

What library do you use for editor tabs and rearranging them? Can you point me to the place in the code that captures the drag events?

@mattpass
Copy link
Collaborator

mattpass commented Nov 9, 2022

No library, wrote my own thing. You can find tabDragStart, tabDragMove and tabDragEnd in icecoder.js between lines 4696 and 4792.

100 tabs are generated on page load, ready to use. It's quite a long line, but the tabs incl the mouse events are here:

echo '<div id="tab' . $i . '" class="tab" onmousedown="if (false === ICEcoder.overCloseLink) {ICEcoder.switchTab(parseInt(this.id.slice(3), 10)); ICEcoder.tabDragStart(parseInt(this.id.slice(3), 10))}; if (1 === event.button) {ICEcoder.closeTab(parseInt(this.id.slice(3), 10)); return false}; thisColor = ICEcoder.colorSelectedText;" onmouseover="thisColor = this.style.color; this.style.color = ICEcoder.colorSelectedText" onmouseout="this.style.color = thisColor" ondblclick="ICEcoder.focusUnfocusTab()"></div>';

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

No branches or pull requests

2 participants