jQuery can help you here.
At the start of your macro you will probably want to do something like
this...
function setsize(place,canvas){
var w = jQuery(place).width();
var h = jQuery(place).height();
canvas.width = w;
vanvas.height = h;
<<redraw to canvas()>>
}
I'd suggest you look at jQuery's window.resize function - this
provides a handler which detects every time there is a change to the
window size so you could adjust the canvas size on a resize of the
entire window.
window.resize(function(e){ setsize(place,canvas)});
I think you could also do
jQuery(place).resize(function(e){ setsize(place,canvas)});
to detect changes to the element holding the canvas..
Hope this helps!
On May 29, 12:34 pm, "[email protected]" <[email protected]> wrote:
> The question is in the tiddler ...
> I have been asked in the user list to add an autosize option to the
> TiddlerGraphPlugin.
> Which means that the canvas in the tiddler would at least be the same
> width as the tiddler, and possibly, follow it's changes.
>
> After having searched the other "visuals" plugin (tiddlytagmindmap,
> asciencepad, etc...)
> I didn't figure out how to do that.
> Can somebody point me the direction ?
>
> regards,
> Yoann
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TiddlyWikiDev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/TiddlyWikiDev?hl=en
-~----------~----~----~----~------~----~------~--~---