|
@@ -254,7 +254,22 @@ export class EditScence extends SGraphScene {
|
|
|
* 增加图标
|
|
|
*/
|
|
|
addIconItem(event: SMouseEvent): void {
|
|
|
- const item = new SImageLegendItem(null, '请在右侧属性栏输入文字!');
|
|
|
+ const LegendData: Legend = {
|
|
|
+ ID: uuid(),
|
|
|
+ Name: this._legend.Name,
|
|
|
+ GraphElementType: this._legend.Type,
|
|
|
+ Num: 0,
|
|
|
+ GraphElementId: this._legend.Id,
|
|
|
+ AttachObjectIds: [],
|
|
|
+ Pos: { X: event.x, Y: event.y },
|
|
|
+ Scale: { X: 1, Y: 1, Z: 1 }, // 缩放
|
|
|
+ Rolate: { X: 0, Y: 0, Z: 0 },
|
|
|
+ // Size: { Width: 0, Height: 0 }, // 大小
|
|
|
+ Properties: {
|
|
|
+ url:this._legend.url
|
|
|
+ },
|
|
|
+ }
|
|
|
+ const item = new SImageLegendItem(null, LegendData);
|
|
|
this.grabItem == null
|
|
|
this.cmd = 'choice';
|
|
|
item.selectable = true;
|