Browse Source

fix child insertion

tripeur 4 năm trước cách đây
mục cha
commit
f957903ec9
4 tập tin đã thay đổi với 3 bổ sung3 xóa
  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];
                 }

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 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 {

Một số tệp đã không được hiển thị bởi vì quá nhiều tập tin thay đổi trong này khác