thanks for your help!
ok, i just tried to keep it simple in the example above, because i think that the problem really lies in the scaling part, or update the document part.
i know about the incremental scaling and deal with it in this way:
// global variables start
scaling = 0.0;
// gets filled somewhere else
shapes = new Array();
// global variables end
function createSettingsDialog() {
var settingsDialog = {
(...)
scaling: { type: "slider", label: "scaling size", value: scaling, range:[0,50], onChange: function(value) {
scaleShapes(scaling, true);
scaleShapes(value, false);
}
}
var values = Dialog.prompt("Settings", settingsDialog);
}
(... somewhere a call to createSettingsDialog)
and the scaleShapes Function:
function scaleTriangles(factor, rescale) {
for(i in shapes) {
shape = shapes[i];
if(shape != null) {
if(rescale) {
scaling = 0.0;
shape.scale(1/(1+(factor/100)));
}
else {
scaling = factor;
shape.scale(1+(factor/100));
}
}
}
}
so values all lie within 0 and 50, that is what the print outs tell as well.
and the incremental scaling is avoided by scaling it down to original size first and the to the new size.
thanks your help, but i think the problem lies somewhere else
Any further ideas?
Axel