- Foldable left panel (user profile) and right panel (task details) - Clicking a task in the list or graph node selects it and shows details - Both views (task list + graph) always mounted via absolute inset-0 for correct canvas dimensions; tabs toggle visibility with opacity - Graph node selection animation: other nodes repel outward (charge -600), then selected node smoothly slides to center (500ms cubic ease-out), then charge restores to -120 and graph stabilizes - Graph re-fits on tab switch and panel resize via ResizeObserver - Fix UUID string IDs throughout (backend returns UUIDs, not integers) - Add TaskDetailPanel, UserPanel components - Add CLAUDE.md project documentation Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
43 lines
1.1 KiB
JavaScript
43 lines
1.1 KiB
JavaScript
import {Transition, newId} from "../transition/index.js";
|
|
import schedule from "../transition/schedule.js";
|
|
import {easeCubicInOut} from "d3-ease";
|
|
import {now} from "d3-timer";
|
|
|
|
var defaultTiming = {
|
|
time: null, // Set on use.
|
|
delay: 0,
|
|
duration: 250,
|
|
ease: easeCubicInOut
|
|
};
|
|
|
|
function inherit(node, id) {
|
|
var timing;
|
|
while (!(timing = node.__transition) || !(timing = timing[id])) {
|
|
if (!(node = node.parentNode)) {
|
|
throw new Error(`transition ${id} not found`);
|
|
}
|
|
}
|
|
return timing;
|
|
}
|
|
|
|
export default function(name) {
|
|
var id,
|
|
timing;
|
|
|
|
if (name instanceof Transition) {
|
|
id = name._id, name = name._name;
|
|
} else {
|
|
id = newId(), (timing = defaultTiming).time = now(), name = name == null ? null : name + "";
|
|
}
|
|
|
|
for (var groups = this._groups, m = groups.length, j = 0; j < m; ++j) {
|
|
for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {
|
|
if (node = group[i]) {
|
|
schedule(node, name, id, i, group, timing || inherit(node, id));
|
|
}
|
|
}
|
|
}
|
|
|
|
return new Transition(groups, this._parents, name, id);
|
|
}
|