Volkan.
9.27.2005
Things to do
After I finish with the editor thingy here is a list of thing I will do in sardalya:
[COMPLETED]
replace all obj.tagName instances with obj.nodeName, cuz nodeName is the preferred method for gething node names.
[COMPLETED]
to cancel the default action instead of returning false, will use EventObject.cancelDefaultAction() which is more robust.
[DONE]
This way, I may get rid of the workaround methods DraggableLayer.strictMode() and DraggableLayer.quirksMode(). This will be a performance gain.
[not possible to implement / cancelled ]
The second performance gain would be achieved by capturing the nodeName on mousedown and using it when necessary instead of taking it by document.getProperSourceFromEvent().tagName at onmousemove.
[DEFERRED TO THE NEXT RELEASE]
Split LayerObject create an in between CollapsibleObject..new CollapsibleObject("IdOfAnInputElement");
is correct, semantically, thannew LayerObject("IdOfAnInputElement");
.
[COMPLETED]
Will make static objects out of static-looking classes. So instead ofdocument.EventRegistry
I will use a construct like;var EventRegistry=new _EventRegistry();
This will be similar in CursorTracker, CookieManager and all other objects which are just a combination of static methods.
[CANCELLED / found the real reason for the problem / NO NEED]
A hotfix to getCursorCoordinates:_this.getCursorPosition=function(){
if(typeof(document._cursorCoordinates)
=="undefined") return new
Dimension(-1,-1);
else return document._cursorCoordinates;
};
the former code was return null instead of (-1,-1) which was spitting out "object not found" errors if you try hard enough (refresh page a dozen of times, move your cursor around in between, include severel ToolTip and DraggableLayer elements in the page etc. etc.)
[COMPLETED]
DraggableLayer...
_lyr=new DynamicLayer(eh.getProperSourceFromEvent(evt,true)),
src=g_dragActiveElement,
_lyr=new DynamicLayer(src),
_lyrCursor=new DynamicLayer(eh.
getProperSourceFromEvent(evt,true)),
Three assignments to the same object. A real resource waste!
[DEFERRED TO THE NEXT RELEASE]
If ToolTip is assigned to an image, it will make its alt "". If it is assigned to a link, it will make title of it "".- .moveTo and resizeTo methods will take Dimensions as parameters (it's more object-oriented).
[DEFERRED TO THE NEXT RELEASE]
In the tooltip constructor useg_arTipObject.push(this);
instead ofdocument._tip_object=this;
Which will enable mutiple ToolTips with multiple timeouts live concurrently on the page.
[NOT STARTED YET]
var g_arPreload=new Array(),
g_intPreloadIndex=-1,
g_intPreloadTimeoutMs=100,
g_blnPreloadEntered=false,
g_image=null;
will be converted to a PreloadMonitor object.
Similarly
var g_currentAction=-1,
g_blnDragStrict=false,
g_currentKeyState=-1,
g_currentMouseState=-1,
g_dragActiveElement=null,
g_dragBeginCoord=null,
g_dragLT=null,
g_dragWH=null,
g_dragCursor=null,
g_blnDragConstructed=false,
g_arDraggableLayer=new Array(),
g_arDragIgnoreID=new Array(),
g_arDragID=new Array(),
g_arDragConstraint=new Array(),
g_arDragConstraintResize=new Array(),
g_arDragAction=new Array();
will be converted to a DragMonitor object. Most probably some of those variables are not necessary and they will be simplified too. Too many (global) members side by side is not a good programming practice.
[COMPLETED]
instead of document.getProperSourceFromEvent() ; new EventObject().getSource() will be used. Which is kinda more oo again.
[DEFERRED TO THE NEXT RELEASE]
I will add a timeout to StyleManaager.remember. If it is specified, it will remember that much days. If not, it will remember for a default period of 14 days.
[DEFERRED TO THE NEXT RELEASE]
Will add new Prototype definitions to Array and String objects.
[DEFERRED TO THE NEXT RELEASE]
Add XHRequest object to sardalya.
[COMPLETED]
Add TextEditor and Editor and DOMManager objects to sardalya.
[COMPLETED]
Merge DOMCleaner with DOMManager.
After all those; sardalya deserves a major version increase from 2.0.2 to 2.1.0.