Add label details panel

This commit is contained in:
2022-03-10 15:59:38 +08:00
parent 27688b9471
commit 1b401dda57
13 changed files with 201 additions and 67 deletions
+15
View File
@@ -1,6 +1,7 @@
import { createContext, Component, FunctionComponent, useState, useEffect, ReactNode } from "react";
import { Emitter } from "@Model/Emitter";
import { Model, ObjectID } from "@Model/Model";
import { Label } from "@Model/Label";
import { Range } from "@Model/Range";
import { Archive } from "@Model/Archive";
import { AbstractRenderer } from "@Model/Renderer";
@@ -27,6 +28,7 @@ interface IStatusEvent {
physicsLoop: number;
mouseModChange: void;
focusObjectChange: void;
focusLabelChange: void;
objectChange: void;
labelChange: void;
rangeAttrChange: void;
@@ -62,6 +64,11 @@ class Status extends Emitter<IStatusEvent> {
*/
public focusObject: Set<ObjectID> = new Set();
/**
* 焦点标签
*/
public focusLabel?: Label;
public constructor() {
super();
@@ -92,6 +99,14 @@ class Status extends Emitter<IStatusEvent> {
this.emit("focusObjectChange");
}
/**
* 更新焦点标签
*/
public setLabelObject(focusLabel?: Label) {
this.focusLabel = focusLabel;
this.emit("focusLabelChange");
}
/**
* 修改范围属性
*/