Skip to main content
15-Moonstone
January 20, 2022
Question

Model Reload or Reset

  • January 20, 2022
  • 1 reply
  • 2155 views

Hi, is there a simple JS method to trigger a model reload or global reset?

 

Many thanks

1 reply

21-Topaz I
January 20, 2022

Hi @GianVal ,

for me is not quite clear what is meant with model reload or global reset. Could you provide an example when you expect these events.

Possibly you can use the event which trigger the model Load . So when you have some model widgets  the event will fire for each widget when it is completely loaded its model. e.g.:

/////////////////////////
$rootScope.$on('modelLoaded', function() { 
 
 console.log("modelLoaded");
statup_y=$scope.view.wdg['model-1']['y'];
statup_scale=$scope.view.wdg['model-1']['scale'];
console.warn("statup_y="+statup_y +" || statup_scale="+statup_scale);
 
 //////////////////////////////////////
});
GianVal15-MoonstoneAuthor
15-Moonstone
January 20, 2022

I mean a global reset of eventually modified graphical properties (shadows, colors etc.)

21-Topaz I
January 20, 2022

how do you modify this graphical property. - example?

Means is this what the sequence does - modification via step etc.?  There is no such mehtod , unfortunately. But you can use the events for step start and step finish or sequence event for the case that change was done by  step start or finish or by setting of new sequence.

In case that the setting was done by some model property e.g. property of modelItem - this could be triggered by $watch statement when you check the property in the $watch statement if it was modified