Explorar o código

fix child insertion

tripeur %!s(int64=4) %!d(string=hai) anos
pai
achega
f957903ec9
Modificáronse 4 ficheiros con 3 adicións e 3 borrados
  1. 1 1
      lib/Timeline.js
  2. 0 0
      lib/Timeline.js.map
  3. 1 1
      package.json
  4. 1 1
      src/Timeline.ts

+ 1 - 1
lib/Timeline.js

@@ -150,7 +150,7 @@ let Timeline = class Timeline extends lit_element_1.LitElement {
                         r.parent.children.splice(pos - idx, 0, r);
                 }
                 else {
-                    this.rows.splice(idx + r.parent.children.length, 0, r);
+                    this.rows.splice(idx + r.parent.children.length + 1, 0, r);
                     if (!alreadyChild)
                         r.parent.children = [...r.parent.children, r];
                 }

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
lib/Timeline.js.map


+ 1 - 1
package.json

@@ -1,6 +1,6 @@
 {
   "name": "jc-timeline",
-  "version": "0.2.8",
+  "version": "0.2.9",
   "description": "web component to manage ressources in time",
   "main": "./lib/main.js",
   "types": "./lib/main.d.ts",

+ 1 - 1
src/Timeline.ts

@@ -202,7 +202,7 @@ class Timeline extends LitElement {
           this.rows.splice(pos, 0, r);
           if (!alreadyChild) r.parent.children.splice(pos - idx, 0, r);
         } else {
-          this.rows.splice(idx + r.parent.children.length, 0, r);
+          this.rows.splice(idx + r.parent.children.length + 1, 0, r);
           if (!alreadyChild) r.parent.children = [...r.parent.children, r];
         }
       } else {

Algúns arquivos non se mostraron porque demasiados arquivos cambiaron neste cambio