Hallo,
ich habe eine Funktion Event.getCoordinates, die mir x und y als Objekt zurückgibt ({'x': x, 'y': x}
)...
nun möchte ich praktisch diese Variablen in den lokalen Kontext importieren, also so etwas wie
var x = Event.getCoordinates(e).x;
var y = Event.getCoordinates(e).y;
was natürlich unperfomant ist, weil die Funktion doppelt aufgerufen wird...
und die Lösung
var c = Event.getCoordinates(e);
var x = c.x;
var y = c.y;
ist auch nicht gerade das gelbe vom Ei... gibts was Besseres?
mfg, Flo
--
sh:) fo:| ch:? rl:( br:^ n4:| ie:{ mo:| va:} de:> zu:} fl:{ ss:) ls:< js:|
sh:) fo:| ch:? rl:( br:^ n4:| ie:{ mo:| va:} de:> zu:} fl:{ ss:) ls:< js:|