This is actually a good example of what might be accieved using javascript/jQuery.
If you in Xara choose to add a text tooltip to an object that will be implemented automatically by Xara to a SPAN tag with a TITLEattribute. Now excuse me for being a little technical, but using the brilliant selector engine of jQuery you can select all such elements and apply - for instance the mentioned tooltip plugin, and thereby get well, another tooltip type.
Here is the selector (for the technical minded ):
$('span[title!=""]')
That will return all standard tooltips on the page, and from there it is easy using jQuery plug-ins to apply some behavior to each of the elements.
Don't worrie if you are a graphical nerd - this coding related thread will soon relocate to some other place What I however hope to deliver to this forum are some easy-to-use new features for the program which we all love to use!
Cheers,
Sten
"Everything has two sides"
Cheers,
Sten
"Everything has two sides"
Here is the first code - and at the same time the place to share the code in this project.
It should be saved along with "roe.js" and included (manually/placeholder) into a HTML file generated by Xara. It does nothing much, just locks the calls made from Xara. Oh and I have tried to turn off all the "document.onmousemove" eventhandler... Here goes!
http://gist.github.com/239092
Cheers,
Sten
"Everything has two sides"
Why have you disabled onmousemove handler?
John.
Hi John,
For starters - this first upload is done late last night and at this state I am only trying to get an overview of what is going on in the Xara javascript library.
I find it bad practice to attach code to global code, unless you cannot do it smarter. Every time the mouse is moved a call is made to the global eventhandler (potentially slowing the page down).
I expect that the elements on the page which needs attention should hook onto events as a situation occures. Like if you move over an element which shows a popup, at that time register a mousemove listener. When the mousemove listener is no longer relevant for that element, remove it again.
Oh and please let me stress that I have not tried to do such collaborative coding before accross the web. I do not expect the discussion on how it should be done/implemented to take place here. Anyone have any experience how to do that?
Cheers,
Sten
"Everything has two sides"
Bugzilla is server software designed to help you manage software development.
Could be a useful discussion/collaboration tool
I have decided to try another approach. I have created a Xara document which serves an a test page, project description and version history page.
That also means that for now the github online source library will not be used (for now).
The actual javascript library has a working title "XXExt.js" and resides beside the exported HTML files and is called "XXExt.js". A ZIP file containing everything you need to run it locally can be found here: http://www.netsi.dk/xara/xxext.zip
You can view the alpha version () of the library here:
http://www.netsi.dk/xara/xxext/index.html
If you wish to add some code or have comments you are welcome to send them to me.
Cheers,
Sten
"Everything has two sides"
Bookmarks