refactor: remove WHAT-comments, keep WHY and RFC references
This commit is contained in:
@@ -1,8 +1,5 @@
|
||||
import { h } from 'vue';
|
||||
|
||||
// Extended property view rendered as a definition list.
|
||||
// `fields`: array of { key, value, editable?, type? }
|
||||
// `onChange`: called with { key, value } when field changes.
|
||||
export const ObjectExtended = {
|
||||
props: ['fields', 'onChange'],
|
||||
setup(props) {
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import { h } from 'vue';
|
||||
|
||||
// One-line summary row with a drill-down chevron.
|
||||
export const ObjectShort = {
|
||||
props: ['label', 'typeTag', 'focused', 'hasChildren', 'readOnly', 'deletable'],
|
||||
emits: ['focus', 'drillDown', 'delete'],
|
||||
|
||||
@@ -58,9 +58,7 @@ export const PaneFO = {
|
||||
return fp.length ? fp[fp.length - 1] : null;
|
||||
}
|
||||
|
||||
// Intercepts the first edit to a linked instrument:
|
||||
// shows embed-or-discard modal before committing. `info.undo`
|
||||
// (forwarded from ShapeEditor/EnvelopeEditor) reverts the mutation on discard.
|
||||
// Guard: first edit to a linked instrument triggers embed-or-discard before committing.
|
||||
function makeChangeHandler(instr) {
|
||||
return (info) => {
|
||||
if (instr.isLinked && !instr.isDirty) {
|
||||
|
||||
@@ -2,14 +2,11 @@ import { h } from 'vue';
|
||||
import { ObjectShort } from './ObjectShort.js';
|
||||
import { getKindGroups } from '../subobject-kinds.js';
|
||||
|
||||
// Strip the final maximal run of same-class characters (all-digits or all-non-digits)
|
||||
// from the ID tail. Everything before that run is the group key.
|
||||
function _barGroupKey(id) {
|
||||
const m = id.match(/(\d+|\D+)$/);
|
||||
return m ? id.slice(0, m.index) : id;
|
||||
}
|
||||
|
||||
// Increment the trailing numeric run of an ID, preserving zero-padding width.
|
||||
function _incrementId(id) {
|
||||
const m = id.match(/(\d+)$/);
|
||||
if (!m) return id + '1';
|
||||
|
||||
Reference in New Issue
Block a user