Ver Fonte

temp fix

Nikolay Suslov há 7 anos atrás
pai
commit
525221dd71
2 ficheiros alterados com 16 adições e 13 exclusões
  1. 12 11
      public/ohmlang-lsys/appui.js
  2. 4 2
      public/ohmlang-lsys/index.vwf.yaml

+ 12 - 11
public/ohmlang-lsys/appui.js

@@ -25,18 +25,19 @@ return {
                                 vwf_view.kernel.callMethod(sceneID, "drawLSys1");
                             }
 
-                        },
-                        {
-                            $cell: true,
-                            $type: "button",
-                            class: "mdc-button mdc-button--raised",
-                            $text: "Create new turtle",
-                            onclick: function (e) {
-                                let sceneID = vwf.find("","/")[0];
-                                vwf_view.kernel.callMethod(sceneID, "createNewTurtle");
-                            }
-
                         }
+                        // {
+                        //     $cell: true,
+                        //     $type: "button",
+                        //     class: "mdc-button mdc-button--raised",
+                        //     $text: "Create new turtle",
+                        //     onclick: function (e) {
+                        //        // let sceneID = vwf.find("","/")[0];
+                        //         vwf_view.kernel.callMethod(sceneID, "createNewTurtle");
+                        //        // let proto = self.getCleanNodePrototype(this._currentNode);
+                        //     }
+
+                        // }
 
                     ]
                 }

+ 4 - 2
public/ohmlang-lsys/index.vwf.yaml

@@ -174,7 +174,7 @@ children:
             makeLSys: |
                 if (this.ready) 
                 {
-                this.clearDraw();
+                //this.clearDraw();
                 this.parseLSys();
                 this.future(0.1).drawLSys();
                 }
@@ -223,7 +223,9 @@ children:
                     this.drawNode.position = endPosition;
             initialize:
                 body: |
+                   // vwf_view.kernel.createProperty(this.id, "angle", function() { return 90 })
                     this.ready = true;
+                    //this.makeLSys();
                     console.log("initialising turtle");
                     //vwf_view.kernel.callMethod(this.id, "testDrawLsys");
 methods:
@@ -236,7 +238,7 @@ methods:
     this.turtle.makeLSys()
   createNewTurtle: |
         console.log("create new turtle");
-        let newTurtle = this.turtle;
+        let newTurtle = vwf.getNode(this.turtle.id, true);
         let randomName = "turtle-" + this.random();
         this.children.create(randomName, newTurtle);
   testTurtle: |