index.vwf.js 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. class UserView {
  2. constructor(view) {
  3. this.view = view;
  4. this.init();
  5. }
  6. init() {
  7. vwf_view.satProperty = function (nodeID, propertyName, propertyValue) {
  8. if (propertyValue === undefined || propertyValue == null) {
  9. return;
  10. }
  11. let props = ["angle", "iteration", "stepLength", "rule", "axiomF", "axiomG"]
  12. let readyForDraw = vwf.getProperty(nodeID, 'readyForDraw');
  13. if (props.includes(propertyName)) {
  14. if (readyForDraw) {
  15. vwf_view.kernel.callMethod(nodeID, "makeLSys");
  16. }
  17. //console.log(propertyName +' - '+ propertyValue);
  18. }
  19. // switch ( propertyName ) {
  20. // case "iteration":
  21. // vwf_view.kernel.callMethod(nodeID, "makeLSys");
  22. // console.log("here!!")
  23. // break;
  24. // default:
  25. // break;
  26. // }
  27. }
  28. }
  29. }
  30. export {UserView as default}