- 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>
33 lines
1.2 KiB
JavaScript
33 lines
1.2 KiB
JavaScript
'use strict';
|
|
|
|
require('../event/behavior/click.js');
|
|
require('../event/behavior/cut.js');
|
|
require('../event/behavior/keydown.js');
|
|
require('../event/behavior/keypress.js');
|
|
require('../event/behavior/keyup.js');
|
|
require('../event/behavior/paste.js');
|
|
require('@testing-library/dom');
|
|
require('../utils/dataTransfer/Clipboard.js');
|
|
var isEditable = require('../utils/edit/isEditable.js');
|
|
var isDisabled = require('../utils/misc/isDisabled.js');
|
|
var focus = require('../event/focus.js');
|
|
var input = require('../event/input.js');
|
|
var selectAll = require('../event/selection/selectAll.js');
|
|
|
|
async function clear(element) {
|
|
if (!isEditable.isEditable(element) || isDisabled.isDisabled(element)) {
|
|
throw new Error('clear()` is only supported on editable elements.');
|
|
}
|
|
focus.focusElement(element);
|
|
if (element.ownerDocument.activeElement !== element) {
|
|
throw new Error('The element to be cleared could not be focused.');
|
|
}
|
|
selectAll.selectAll(element);
|
|
if (!selectAll.isAllSelected(element)) {
|
|
throw new Error('The element content to be cleared could not be selected.');
|
|
}
|
|
input.input(this, element, '', 'deleteContentBackward');
|
|
}
|
|
|
|
exports.clear = clear;
|