vakata/jstree — Issue #126: less restrictive 'lock' or another function
Author: ChrisRaven
Created: 2011-11-10 11:09:54+00:00
State: open

Hi

I think, that maybe the lock() function should be less restrictive and block only user interactions with a tree, e.g. keyboard shortcuts, mouse clicks and hovers, but functions such as get_text(), _get_node(), etc. should be still available to programmer.
Or maybe there should be another pair of functions for this purpose, e.g. lock_interactions()/unlock_interactions() or block()/unblock() or something like this.

I'm writing about this, because I'm using jQuery UI's dialog boxes to add some functionality to tree (adding, renaming, etc.) and I added triggering events when dialog is opened or closed. With these events I've bounded (actuallly, according to new jQuery, I on()'ed ;) ) functions to lock and unlock tree. But when I want to get some information from tree (e.g. node name), while dialog is opened, I have to manually unlock and then lock tree again. If only user interactions were blocked, then I wouldn't care about locking.

Best regards
ChrisRaven