SpiderStrategies / kalpa-tree

A tree implementation backed by D3
http://spiderstrategies.github.io/kalpa-tree/
ISC License
4 stars 2 forks source link

Tree partially expanded with initialSelection? #208

Closed mattsgarlata closed 9 years ago

mattsgarlata commented 9 years ago

It seems like forest trees end up partially expanded when an initialSelection is specified. Am I going crazy or is this an issue in scoreboard-tree?

screen shot 2015-09-11 at 2 00 25 pm

nathanbowser commented 9 years ago

Looks like it's also animating with an initialSelection setting.

nathanbowser commented 9 years ago

Hey @mattsgarlata. Do you happen to have this tree json object available? If not, no worries, I'll create a similar structure.

mattsgarlata commented 9 years ago

I can probably get it pretty easily, but I'll need a few minutes.

mattsgarlata commented 9 years ago

The database I used to create that tree is on my old hard drive which went bad so I don't have that exact data. Here's similar data, though.

[ {
  "id" : 67731457,
  "label" : "background image",
  "parentId" : -1,
  "organizationId" : 2,
  "type" : "dashboard"
}, {
  "id" : 293309370,
  "label" : "ab",
  "parentId" : -1,
  "type" : "folder"
}, {
  "id" : 293306370,
  "label" : "folder",
  "parentId" : -1,
  "type" : "folder"
}, {
  "id" : 293306371,
  "label" : "b",
  "parentId" : 293306370,
  "type" : "folder"
}, {
  "id" : 95092736,
  "label" : "chart",
  "parentId" : -1,
  "type" : "dashboard"
}, {
  "id" : 89030656,
  "label" : "drilldown",
  "parentId" : 95092736,
  "type" : "dashboard"
}, {
  "id" : 8617985,
  "label" : "Manufacturing Gauge WOBs",
  "parentId" : -1,
  "type" : "dashboard"
}, {
  "id" : 39878658,
  "label" : "New Chart Types",
  "parentId" : -1,
  "type" : "dashboard"
}, {
  "id" : 81821696,
  "label" : "polt",
  "parentId" : -1,
  "type" : "dashboard"
}, {
  "id" : 16875527,
  "label" : "sample",
  "parentId" : -1,
  "type" : "dashboard"
}, {
  "id" : 7864320,
  "label" : "Strategy Map",
  "parentId" : -1,
  "type" : "dashboard"
}, {
  "id" : 67796992,
  "label" : "test",
  "parentId" : -1,
  "type" : "dashboard"
}, {
  "id" : 18907136,
  "label" : "test1",
  "parentId" : -1,
  "type" : "dashboard"
}, {
  "id" : 293306372,
  "label" : "g",
  "parentId" : -1,
  "type" : "folder"
}, {
  "id" : 293306373,
  "label" : "h",
  "parentId" : 293306372,
  "type" : "folder"
}, {
  "id" : 293306374,
  "label" : "i",
  "parentId" : 293306372,
  "type" : "folder"
}, {
  "id" : 293306375,
  "label" : "asdf",
  "parentId" : 293306374,
  "type" : "dashboard"
}, {
  "id" : 293310370,
  "label" : "background image",
  "parentId" : -1,
  "type" : "dashboard"
}, {
  "id" : 293310371,
  "label" : "background image",
  "parentId" : -1,
  "type" : "dashboard"
}, {
  "id" : 293310372,
  "label" : "background image",
  "parentId" : -1,
  "type" : "dashboard"
}, {
  "id" : 293310373,
  "label" : "xczvzxcvbackground imageasdf",
  "parentId" : -1,
  "type" : "dashboard"
}, {
  "id" : 293311370,
  "label" : "abackground imagez",
  "parentId" : -1,
  "type" : "dashboard"
} ]