修改protoc结构
This commit is contained in:
parent
382b462880
commit
c0cc5fac14
@ -1 +1 @@
|
|||||||
Subproject commit 49c235a66f0f6a89c68039bd904eadd9497f8219
|
Subproject commit ea8b911846b63f649a254250ba81c7a804da332a
|
@ -93,7 +93,7 @@ export async function sharedDraftPageQuery(
|
|||||||
sharedDraftIscsDataPaging(paging: $paging, query: $query) {
|
sharedDraftIscsDataPaging(paging: $paging, query: $query) {
|
||||||
total
|
total
|
||||||
items {
|
items {
|
||||||
draftData {id name dataType userName defaultReleaseDataId createdAt updatedAt isShared defaultReleaseDataName}
|
draftData {id name dataType userName userId defaultReleaseDataId createdAt updatedAt isShared defaultReleaseDataName}
|
||||||
options {style}
|
options {style}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
@blur="onUpdate"
|
@blur="onUpdate"
|
||||||
label="线宽"
|
label="线宽"
|
||||||
lazy-rules
|
lazy-rules
|
||||||
:rules="[(val) => (val && val > 0) || '画布宽必须大于0']"
|
:rules="[(val) => (val && val > 0) || '线宽必须大于0']"
|
||||||
/>
|
/>
|
||||||
<q-input
|
<q-input
|
||||||
outlined
|
outlined
|
||||||
@ -34,6 +34,40 @@
|
|||||||
</q-icon>
|
</q-icon>
|
||||||
</template>
|
</template>
|
||||||
</q-input>
|
</q-input>
|
||||||
|
<q-input
|
||||||
|
outlined
|
||||||
|
v-model="rectModel.fillColor"
|
||||||
|
@blur="onUpdate"
|
||||||
|
label="填充色"
|
||||||
|
lazy-rules
|
||||||
|
:rules="[(val) => (val && val.length > 0) || '线色不能为空']"
|
||||||
|
>
|
||||||
|
<template v-slot:append>
|
||||||
|
<q-icon name="colorize" class="cursor-pointer">
|
||||||
|
<q-popup-proxy cover transition-show="scale" transition-hide="scale">
|
||||||
|
<q-color
|
||||||
|
v-model="rectModel.fillColor"
|
||||||
|
@change="
|
||||||
|
(val) => {
|
||||||
|
rectModel.fillColor = val;
|
||||||
|
onUpdate();
|
||||||
|
}
|
||||||
|
"
|
||||||
|
/>
|
||||||
|
</q-popup-proxy>
|
||||||
|
</q-icon>
|
||||||
|
</template>
|
||||||
|
</q-input>
|
||||||
|
<q-input
|
||||||
|
outlined
|
||||||
|
v-model="rectModel.alpha"
|
||||||
|
@blur="onUpdate"
|
||||||
|
label="透明度"
|
||||||
|
lazy-rules
|
||||||
|
:rules="[
|
||||||
|
(val) => (val && val > 0 && val <= 1) || '透明度必须大于0且小于等于1',
|
||||||
|
]"
|
||||||
|
/>
|
||||||
<q-input
|
<q-input
|
||||||
outlined
|
outlined
|
||||||
v-model.number="rectModel.width"
|
v-model.number="rectModel.width"
|
||||||
|
@ -78,24 +78,26 @@ export function initCommonDrawApp(app: IDrawApp) {
|
|||||||
|
|
||||||
interface ICommonStorage {
|
interface ICommonStorage {
|
||||||
canvas: common.Canvas;
|
canvas: common.Canvas;
|
||||||
arrows: iscsGraphicData.Arrow[];
|
commonGraphicStorage: {
|
||||||
iscsTexts: iscsGraphicData.IscsText[];
|
arrows: iscsGraphicData.Arrow[];
|
||||||
rects: iscsGraphicData.Rect[];
|
texts: iscsGraphicData.Text[];
|
||||||
lines: iscsGraphicData.Line[];
|
rects: iscsGraphicData.Rect[];
|
||||||
|
lines: iscsGraphicData.Line[];
|
||||||
|
};
|
||||||
}
|
}
|
||||||
export function loadCommonDrawDatas(storage: ICommonStorage): GraphicData[] {
|
export function loadCommonDrawDatas(storage: ICommonStorage): GraphicData[] {
|
||||||
const datas: GraphicData[] = [];
|
const datas: GraphicData[] = [];
|
||||||
console.log(storage, 'storage');
|
console.log(storage, 'storage');
|
||||||
storage.arrows.forEach((arrow) => {
|
storage.commonGraphicStorage.arrows.forEach((arrow) => {
|
||||||
datas.push(new ArrowData(arrow));
|
datas.push(new ArrowData(arrow));
|
||||||
});
|
});
|
||||||
storage.iscsTexts.forEach((iscsText) => {
|
storage.commonGraphicStorage.texts.forEach((iscsText) => {
|
||||||
datas.push(new IscsTextData(iscsText));
|
datas.push(new IscsTextData(iscsText));
|
||||||
});
|
});
|
||||||
storage.rects.forEach((rect) => {
|
storage.commonGraphicStorage.rects.forEach((rect) => {
|
||||||
datas.push(new RectData(rect));
|
datas.push(new RectData(rect));
|
||||||
});
|
});
|
||||||
storage.lines.forEach((line) => {
|
storage.commonGraphicStorage.lines.forEach((line) => {
|
||||||
datas.push(new LineData(line));
|
datas.push(new LineData(line));
|
||||||
});
|
});
|
||||||
return datas;
|
return datas;
|
||||||
@ -113,16 +115,16 @@ export function saveCommonDrawDatas(app: IDrawApp, storage: ICommonStorage) {
|
|||||||
graphics.forEach((g) => {
|
graphics.forEach((g) => {
|
||||||
if (g instanceof Arrow) {
|
if (g instanceof Arrow) {
|
||||||
const arrowData = g.saveData();
|
const arrowData = g.saveData();
|
||||||
storage.arrows.push((arrowData as ArrowData).data);
|
storage.commonGraphicStorage.arrows.push((arrowData as ArrowData).data);
|
||||||
} else if (g instanceof TextContent) {
|
} else if (g instanceof TextContent) {
|
||||||
const textContentData = g.saveData();
|
const textContentData = g.saveData();
|
||||||
storage.iscsTexts.push((textContentData as IscsTextData).data);
|
storage.commonGraphicStorage.texts.push((textContentData as IscsTextData).data);
|
||||||
} else if (g instanceof Rect) {
|
} else if (g instanceof Rect) {
|
||||||
const rectData = g.saveData();
|
const rectData = g.saveData();
|
||||||
storage.rects.push((rectData as RectData).data);
|
storage.commonGraphicStorage.rects.push((rectData as RectData).data);
|
||||||
} else if (g instanceof Line) {
|
} else if (g instanceof Line) {
|
||||||
const lineData = g.saveData();
|
const lineData = g.saveData();
|
||||||
storage.lines.push((lineData as LineData).data);
|
storage.commonGraphicStorage.lines.push((lineData as LineData).data);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -162,7 +164,7 @@ export function handlerCommonTypeData(data: sync_data_message.UpdataData) {
|
|||||||
case Arrow.Type:
|
case Arrow.Type:
|
||||||
return new ArrowData(iscsGraphicData.Arrow.deserialize(data.data));
|
return new ArrowData(iscsGraphicData.Arrow.deserialize(data.data));
|
||||||
case TextContent.Type:
|
case TextContent.Type:
|
||||||
return new IscsTextData(iscsGraphicData.IscsText.deserialize(data.data));
|
return new IscsTextData(iscsGraphicData.Text.deserialize(data.data));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -176,27 +178,27 @@ export function handlerNoEditCommonData(
|
|||||||
const rectData = iscsGraphicData.Rect.deserialize(data.data);
|
const rectData = iscsGraphicData.Rect.deserialize(data.data);
|
||||||
// syncNoEditData(operationType, rectData, storage.rects);
|
// syncNoEditData(operationType, rectData, storage.rects);
|
||||||
if (operationType === 'graphic-create') {
|
if (operationType === 'graphic-create') {
|
||||||
storage.rects.push(rectData);
|
storage.commonGraphicStorage.rects.push(rectData);
|
||||||
} else if (operationType === 'graphic-delete') {
|
} else if (operationType === 'graphic-delete') {
|
||||||
const index = storage.rects.findIndex(
|
const index = storage.commonGraphicStorage.rects.findIndex(
|
||||||
(ele) => ele.common.id === rectData.common.id
|
(ele) => ele.common.id === rectData.common.id
|
||||||
);
|
);
|
||||||
storage.rects.splice(index, 1);
|
storage.commonGraphicStorage.rects.splice(index, 1);
|
||||||
} else if (operationType === 'graphic-drag') {
|
} else if (operationType === 'graphic-drag') {
|
||||||
const index = storage.rects.findIndex(
|
const index = storage.commonGraphicStorage.rects.findIndex(
|
||||||
(ele) => ele.common.id === rectData.common.id
|
(ele) => ele.common.id === rectData.common.id
|
||||||
);
|
);
|
||||||
storage.rects[index] = rectData;
|
storage.commonGraphicStorage.rects[index] = rectData;
|
||||||
}
|
}
|
||||||
console.log(rectData, storage);
|
console.log(rectData, storage);
|
||||||
break;
|
break;
|
||||||
case Arrow.Type:
|
case Arrow.Type:
|
||||||
const arrowData = iscsGraphicData.Arrow.deserialize(data.data);
|
const arrowData = iscsGraphicData.Arrow.deserialize(data.data);
|
||||||
syncNoEditData(operationType, arrowData, storage.arrows);
|
syncNoEditData(operationType, arrowData, storage.commonGraphicStorage.arrows);
|
||||||
break;
|
break;
|
||||||
case TextContent.Type:
|
case TextContent.Type:
|
||||||
const iscsTextData = iscsGraphicData.IscsText.deserialize(data.data);
|
const iscsTextData = iscsGraphicData.Text.deserialize(data.data);
|
||||||
syncNoEditData(operationType, iscsTextData, storage.iscsTexts);
|
syncNoEditData(operationType, iscsTextData, storage.commonGraphicStorage.texts);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -7,20 +7,20 @@ import { iscsGraphicData } from 'src/protos/iscs_graphic_data';
|
|||||||
import { GraphicDataBase } from './GraphicDataBase';
|
import { GraphicDataBase } from './GraphicDataBase';
|
||||||
|
|
||||||
export class IscsTextData extends GraphicDataBase implements ITextContentData {
|
export class IscsTextData extends GraphicDataBase implements ITextContentData {
|
||||||
constructor(data?: iscsGraphicData.IscsText) {
|
constructor(data?: iscsGraphicData.Text) {
|
||||||
let pslText;
|
let pslText;
|
||||||
if (data) {
|
if (data) {
|
||||||
pslText = data;
|
pslText = data;
|
||||||
} else {
|
} else {
|
||||||
pslText = new iscsGraphicData.IscsText({
|
pslText = new iscsGraphicData.Text({
|
||||||
common: GraphicDataBase.defaultCommonInfo(TextContent.Type),
|
common: GraphicDataBase.defaultCommonInfo(TextContent.Type),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
super(pslText);
|
super(pslText);
|
||||||
}
|
}
|
||||||
|
|
||||||
public get data(): iscsGraphicData.IscsText {
|
public get data(): iscsGraphicData.Text {
|
||||||
return this.getData<iscsGraphicData.IscsText>();
|
return this.getData<iscsGraphicData.Text>();
|
||||||
}
|
}
|
||||||
|
|
||||||
get code(): string {
|
get code(): string {
|
||||||
|
@ -64,6 +64,18 @@ export class RectData extends GraphicDataBase implements IRectData {
|
|||||||
set radius(v: number) {
|
set radius(v: number) {
|
||||||
this.data.radius = v;
|
this.data.radius = v;
|
||||||
}
|
}
|
||||||
|
get fillColor(): string {
|
||||||
|
return this.data.fillColor;
|
||||||
|
}
|
||||||
|
set fillColor(v: string) {
|
||||||
|
this.data.fillColor = v;
|
||||||
|
}
|
||||||
|
get alpha(): number {
|
||||||
|
return this.data.alpha;
|
||||||
|
}
|
||||||
|
set alpha(v: number) {
|
||||||
|
this.data.alpha = v;
|
||||||
|
}
|
||||||
clone(): RectData {
|
clone(): RectData {
|
||||||
return new RectData(this.data.cloneMessage());
|
return new RectData(this.data.cloneMessage());
|
||||||
}
|
}
|
||||||
|
@ -125,8 +125,8 @@ function handleSubscribe(app: IDrawApp) {
|
|||||||
toUint8Array(base64)
|
toUint8Array(base64)
|
||||||
);
|
);
|
||||||
if (syncData.submenu === '火灾报警平面图') {
|
if (syncData.submenu === '火灾报警平面图') {
|
||||||
for (let i = 0; i < storage.fasPlatformAlarmStorages.length; i++) {
|
for (let i = 0; i < storage.fasOfPlatformAlarmStorages.length; i++) {
|
||||||
const fasPlatformAlarm = storage.fasPlatformAlarmStorages[i];
|
const fasPlatformAlarm = storage.fasOfPlatformAlarmStorages[i];
|
||||||
if (fasPlatformAlarm.stationName == syncData.station) {
|
if (fasPlatformAlarm.stationName == syncData.station) {
|
||||||
// canvasProperty = fasPlatformAlarm.canvas;
|
// canvasProperty = fasPlatformAlarm.canvas;
|
||||||
// datas = loadCommonDrawDatas(fasPlatformAlarm);
|
// datas = loadCommonDrawDatas(fasPlatformAlarm);
|
||||||
@ -138,7 +138,7 @@ function handleSubscribe(app: IDrawApp) {
|
|||||||
syncData.operationType
|
syncData.operationType
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
storage.fasPlatformAlarmStorages[i] = fasPlatformAlarm;
|
storage.fasOfPlatformAlarmStorages[i] = fasPlatformAlarm;
|
||||||
console.log(fasPlatformAlarm, 'fasPlatformAlarm');
|
console.log(fasPlatformAlarm, 'fasPlatformAlarm');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -216,14 +216,14 @@ export async function loadDrawDatas(): Promise<IGraphicStorage> {
|
|||||||
|
|
||||||
switch (drawStore.selectSubmenuAndStation.submenu) {
|
switch (drawStore.selectSubmenuAndStation.submenu) {
|
||||||
case '火灾报警平面图':
|
case '火灾报警平面图':
|
||||||
for (let i = 0; i < storage.fasPlatformAlarmStorages.length; i++) {
|
for (let i = 0; i < storage.fasOfPlatformAlarmStorages.length; i++) {
|
||||||
const fasPlatformAlarm = storage.fasPlatformAlarmStorages[i];
|
const fasOfPlatformAlarm = storage.fasOfPlatformAlarmStorages[i];
|
||||||
if (
|
if (
|
||||||
fasPlatformAlarm.stationName ==
|
fasOfPlatformAlarm.stationName ==
|
||||||
drawStore.selectSubmenuAndStation.station
|
drawStore.selectSubmenuAndStation.station
|
||||||
) {
|
) {
|
||||||
canvasProperty = fasPlatformAlarm.canvas;
|
canvasProperty = fasOfPlatformAlarm.canvas;
|
||||||
datas = loadCommonDrawDatas(fasPlatformAlarm);
|
datas = loadCommonDrawDatas(fasOfPlatformAlarm);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -266,11 +266,12 @@ export function saveDrawDatas(app: IDrawApp) {
|
|||||||
if (!storage) {
|
if (!storage) {
|
||||||
storage = new iscsGraphicData.IscsGraphicStorage();
|
storage = new iscsGraphicData.IscsGraphicStorage();
|
||||||
}
|
}
|
||||||
if (!storage?.fasPlatformAlarmStorages.length) {
|
if (!storage?.fasOfPlatformAlarmStorages.length) {
|
||||||
stationOption.forEach((station) =>
|
stationOption.forEach((station) =>
|
||||||
storage?.fasPlatformAlarmStorages.push(
|
storage?.fasOfPlatformAlarmStorages.push(
|
||||||
new iscsGraphicData.FASPlatformAlarmStorage({
|
new iscsGraphicData.FASOfPlatformAlarmStorage({
|
||||||
stationName: station,
|
stationName: station,
|
||||||
|
commonGraphicStorage: new iscsGraphicData.CommonGraphicStorage(),
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
@ -280,26 +281,28 @@ export function saveDrawDatas(app: IDrawApp) {
|
|||||||
storage?.cctvOfStationControlStorages.push(
|
storage?.cctvOfStationControlStorages.push(
|
||||||
new iscsGraphicData.CCTVOfStationControlStorage({
|
new iscsGraphicData.CCTVOfStationControlStorage({
|
||||||
stationName: station,
|
stationName: station,
|
||||||
|
commonGraphicStorage: new iscsGraphicData.CommonGraphicStorage(),
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
switch (drawStore.selectSubmenuAndStation.submenu) {
|
switch (drawStore.selectSubmenuAndStation.submenu) {
|
||||||
case '火灾报警平面图':
|
case '火灾报警平面图':
|
||||||
for (let i = 0; i < storage.fasPlatformAlarmStorages.length; i++) {
|
for (let i = 0; i < storage.fasOfPlatformAlarmStorages.length; i++) {
|
||||||
let fasPlatformAlarm = storage.fasPlatformAlarmStorages[i];
|
let fasOfPlatformAlarm = storage.fasOfPlatformAlarmStorages[i];
|
||||||
if (
|
if (
|
||||||
fasPlatformAlarm.stationName ==
|
fasOfPlatformAlarm.stationName ==
|
||||||
drawStore.selectSubmenuAndStation.station
|
drawStore.selectSubmenuAndStation.station
|
||||||
) {
|
) {
|
||||||
fasPlatformAlarm = new iscsGraphicData.FASPlatformAlarmStorage({
|
fasOfPlatformAlarm = new iscsGraphicData.FASOfPlatformAlarmStorage({
|
||||||
stationName: drawStore.selectSubmenuAndStation.station,
|
stationName: drawStore.selectSubmenuAndStation.station,
|
||||||
|
commonGraphicStorage: new iscsGraphicData.CommonGraphicStorage(),
|
||||||
});
|
});
|
||||||
const fasStorage = saveCommonDrawDatas(
|
const fasStorage = saveCommonDrawDatas(
|
||||||
app,
|
app,
|
||||||
fasPlatformAlarm
|
fasOfPlatformAlarm
|
||||||
) as iscsGraphicData.FASPlatformAlarmStorage;
|
) as iscsGraphicData.FASOfPlatformAlarmStorage;
|
||||||
storage.fasPlatformAlarmStorages[i] = fasStorage;
|
storage.fasOfPlatformAlarmStorages[i] = fasStorage;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -314,6 +317,7 @@ export function saveDrawDatas(app: IDrawApp) {
|
|||||||
cctvOfStationControl =
|
cctvOfStationControl =
|
||||||
new iscsGraphicData.CCTVOfStationControlStorage({
|
new iscsGraphicData.CCTVOfStationControlStorage({
|
||||||
stationName: drawStore.selectSubmenuAndStation.station,
|
stationName: drawStore.selectSubmenuAndStation.station,
|
||||||
|
commonGraphicStorage: new iscsGraphicData.CommonGraphicStorage(),
|
||||||
});
|
});
|
||||||
const cctvStorage = saveCommonDrawDatas(
|
const cctvStorage = saveCommonDrawDatas(
|
||||||
app,
|
app,
|
||||||
|
@ -21,6 +21,10 @@ export interface IRectData extends GraphicData {
|
|||||||
set height(v: number);
|
set height(v: number);
|
||||||
get radius(): number; // 圆角半径
|
get radius(): number; // 圆角半径
|
||||||
set radius(v: number);
|
set radius(v: number);
|
||||||
|
get fillColor(): string; // 填充色
|
||||||
|
set fillColor(v: string);
|
||||||
|
get alpha(): number; // 透明度
|
||||||
|
set alpha(v: number);
|
||||||
clone(): IRectData;
|
clone(): IRectData;
|
||||||
copyFrom(data: IRectData): void;
|
copyFrom(data: IRectData): void;
|
||||||
eq(other: IRectData): boolean;
|
eq(other: IRectData): boolean;
|
||||||
@ -29,6 +33,8 @@ export interface IRectData extends GraphicData {
|
|||||||
const rectConsts = {
|
const rectConsts = {
|
||||||
lineWidth: 2,
|
lineWidth: 2,
|
||||||
lineColor: '0xff0000',
|
lineColor: '0xff0000',
|
||||||
|
fillColor: '0xff0000',
|
||||||
|
alpha: 0.001,
|
||||||
};
|
};
|
||||||
|
|
||||||
export class Rect extends JlGraphic {
|
export class Rect extends JlGraphic {
|
||||||
@ -50,6 +56,7 @@ export class Rect extends JlGraphic {
|
|||||||
new Color(this.datas.lineColor)
|
new Color(this.datas.lineColor)
|
||||||
);
|
);
|
||||||
const radius = this.datas?.radius || 0;
|
const radius = this.datas?.radius || 0;
|
||||||
|
rectGraphic.beginFill(this.datas.fillColor, this.datas.alpha);
|
||||||
rectGraphic.drawRoundedRect(
|
rectGraphic.drawRoundedRect(
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
@ -57,6 +64,7 @@ export class Rect extends JlGraphic {
|
|||||||
this.datas.height,
|
this.datas.height,
|
||||||
radius
|
radius
|
||||||
);
|
);
|
||||||
|
rectGraphic.endFill;
|
||||||
rectGraphic.pivot = getRectangleCenter(
|
rectGraphic.pivot = getRectangleCenter(
|
||||||
new Rectangle(0, 0, this.datas.width, this.datas.height)
|
new Rectangle(0, 0, this.datas.width, this.datas.height)
|
||||||
);
|
);
|
||||||
@ -86,12 +94,16 @@ export class Rect extends JlGraphic {
|
|||||||
export class RectTemplate extends JlGraphicTemplate<Rect> {
|
export class RectTemplate extends JlGraphicTemplate<Rect> {
|
||||||
lineWidth: number;
|
lineWidth: number;
|
||||||
lineColor: string;
|
lineColor: string;
|
||||||
|
fillColor: string;
|
||||||
|
alpha: number;
|
||||||
constructor(dataTemplate: IRectData) {
|
constructor(dataTemplate: IRectData) {
|
||||||
super(Rect.Type, {
|
super(Rect.Type, {
|
||||||
dataTemplate,
|
dataTemplate,
|
||||||
});
|
});
|
||||||
this.lineWidth = rectConsts.lineWidth;
|
this.lineWidth = rectConsts.lineWidth;
|
||||||
this.lineColor = rectConsts.lineColor;
|
this.lineColor = rectConsts.lineColor;
|
||||||
|
this.fillColor = rectConsts.fillColor;
|
||||||
|
this.alpha = rectConsts.alpha;
|
||||||
}
|
}
|
||||||
new(): Rect {
|
new(): Rect {
|
||||||
return new Rect();
|
return new Rect();
|
||||||
|
@ -1,10 +1,9 @@
|
|||||||
import { FederatedPointerEvent, Graphics, Point, IHitArea } from 'pixi.js';
|
import { FederatedPointerEvent, Graphics, Point } from 'pixi.js';
|
||||||
import {
|
import {
|
||||||
GraphicDrawAssistant,
|
GraphicDrawAssistant,
|
||||||
GraphicInteractionPlugin,
|
GraphicInteractionPlugin,
|
||||||
IDrawApp,
|
IDrawApp,
|
||||||
JlGraphic,
|
JlGraphic,
|
||||||
pointBox,
|
|
||||||
} from 'jl-graphic';
|
} from 'jl-graphic';
|
||||||
|
|
||||||
import { IRectData, Rect, RectTemplate } from './Rect';
|
import { IRectData, Rect, RectTemplate } from './Rect';
|
||||||
@ -65,27 +64,14 @@ export class RectDraw extends GraphicDrawAssistant<RectTemplate, IRectData> {
|
|||||||
data.point = new Point(x, y);
|
data.point = new Point(x, y);
|
||||||
data.lineWidth = template.lineWidth;
|
data.lineWidth = template.lineWidth;
|
||||||
data.lineColor = template.lineColor;
|
data.lineColor = template.lineColor;
|
||||||
|
data.fillColor = template.fillColor;
|
||||||
|
data.alpha = template.alpha;
|
||||||
data.width = width;
|
data.width = width;
|
||||||
data.height = height;
|
data.height = height;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//碰撞检测
|
|
||||||
export class RectGraphicHitArea implements IHitArea {
|
|
||||||
rect: Rect;
|
|
||||||
constructor(rect: Rect) {
|
|
||||||
this.rect = rect;
|
|
||||||
}
|
|
||||||
contains(x: number, y: number): boolean {
|
|
||||||
const boxRect = this.rect.getLocalBounds();
|
|
||||||
let contains = false;
|
|
||||||
const p = new Point(x, y);
|
|
||||||
contains = contains || pointBox(p, boxRect);
|
|
||||||
return contains;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export class rectInteraction extends GraphicInteractionPlugin<Rect> {
|
export class rectInteraction extends GraphicInteractionPlugin<Rect> {
|
||||||
static Name = 'platform_transform';
|
static Name = 'platform_transform';
|
||||||
constructor(app: IDrawApp) {
|
constructor(app: IDrawApp) {
|
||||||
@ -102,7 +88,6 @@ export class rectInteraction extends GraphicInteractionPlugin<Rect> {
|
|||||||
g.cursor = 'pointer';
|
g.cursor = 'pointer';
|
||||||
g.scalable = true;
|
g.scalable = true;
|
||||||
g.rotatable = true;
|
g.rotatable = true;
|
||||||
g.rectGraphic.hitArea = new RectGraphicHitArea(g);
|
|
||||||
}
|
}
|
||||||
unbind(g: Rect): void {
|
unbind(g: Rect): void {
|
||||||
g.eventMode = 'none';
|
g.eventMode = 'none';
|
||||||
|
@ -10,7 +10,7 @@ export namespace iscsGraphicData {
|
|||||||
#one_of_decls: number[][] = [];
|
#one_of_decls: number[][] = [];
|
||||||
constructor(data?: any[] | {
|
constructor(data?: any[] | {
|
||||||
cctvOfStationControlStorages?: CCTVOfStationControlStorage[];
|
cctvOfStationControlStorages?: CCTVOfStationControlStorage[];
|
||||||
fasPlatformAlarmStorages?: FASPlatformAlarmStorage[];
|
fasOfPlatformAlarmStorages?: FASOfPlatformAlarmStorage[];
|
||||||
}) {
|
}) {
|
||||||
super();
|
super();
|
||||||
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [1, 2], this.#one_of_decls);
|
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [1, 2], this.#one_of_decls);
|
||||||
@ -18,8 +18,8 @@ export namespace iscsGraphicData {
|
|||||||
if ("cctvOfStationControlStorages" in data && data.cctvOfStationControlStorages != undefined) {
|
if ("cctvOfStationControlStorages" in data && data.cctvOfStationControlStorages != undefined) {
|
||||||
this.cctvOfStationControlStorages = data.cctvOfStationControlStorages;
|
this.cctvOfStationControlStorages = data.cctvOfStationControlStorages;
|
||||||
}
|
}
|
||||||
if ("fasPlatformAlarmStorages" in data && data.fasPlatformAlarmStorages != undefined) {
|
if ("fasOfPlatformAlarmStorages" in data && data.fasOfPlatformAlarmStorages != undefined) {
|
||||||
this.fasPlatformAlarmStorages = data.fasPlatformAlarmStorages;
|
this.fasOfPlatformAlarmStorages = data.fasOfPlatformAlarmStorages;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -29,35 +29,35 @@ export namespace iscsGraphicData {
|
|||||||
set cctvOfStationControlStorages(value: CCTVOfStationControlStorage[]) {
|
set cctvOfStationControlStorages(value: CCTVOfStationControlStorage[]) {
|
||||||
pb_1.Message.setRepeatedWrapperField(this, 1, value);
|
pb_1.Message.setRepeatedWrapperField(this, 1, value);
|
||||||
}
|
}
|
||||||
get fasPlatformAlarmStorages() {
|
get fasOfPlatformAlarmStorages() {
|
||||||
return pb_1.Message.getRepeatedWrapperField(this, FASPlatformAlarmStorage, 2) as FASPlatformAlarmStorage[];
|
return pb_1.Message.getRepeatedWrapperField(this, FASOfPlatformAlarmStorage, 2) as FASOfPlatformAlarmStorage[];
|
||||||
}
|
}
|
||||||
set fasPlatformAlarmStorages(value: FASPlatformAlarmStorage[]) {
|
set fasOfPlatformAlarmStorages(value: FASOfPlatformAlarmStorage[]) {
|
||||||
pb_1.Message.setRepeatedWrapperField(this, 2, value);
|
pb_1.Message.setRepeatedWrapperField(this, 2, value);
|
||||||
}
|
}
|
||||||
static fromObject(data: {
|
static fromObject(data: {
|
||||||
cctvOfStationControlStorages?: ReturnType<typeof CCTVOfStationControlStorage.prototype.toObject>[];
|
cctvOfStationControlStorages?: ReturnType<typeof CCTVOfStationControlStorage.prototype.toObject>[];
|
||||||
fasPlatformAlarmStorages?: ReturnType<typeof FASPlatformAlarmStorage.prototype.toObject>[];
|
fasOfPlatformAlarmStorages?: ReturnType<typeof FASOfPlatformAlarmStorage.prototype.toObject>[];
|
||||||
}): IscsGraphicStorage {
|
}): IscsGraphicStorage {
|
||||||
const message = new IscsGraphicStorage({});
|
const message = new IscsGraphicStorage({});
|
||||||
if (data.cctvOfStationControlStorages != null) {
|
if (data.cctvOfStationControlStorages != null) {
|
||||||
message.cctvOfStationControlStorages = data.cctvOfStationControlStorages.map(item => CCTVOfStationControlStorage.fromObject(item));
|
message.cctvOfStationControlStorages = data.cctvOfStationControlStorages.map(item => CCTVOfStationControlStorage.fromObject(item));
|
||||||
}
|
}
|
||||||
if (data.fasPlatformAlarmStorages != null) {
|
if (data.fasOfPlatformAlarmStorages != null) {
|
||||||
message.fasPlatformAlarmStorages = data.fasPlatformAlarmStorages.map(item => FASPlatformAlarmStorage.fromObject(item));
|
message.fasOfPlatformAlarmStorages = data.fasOfPlatformAlarmStorages.map(item => FASOfPlatformAlarmStorage.fromObject(item));
|
||||||
}
|
}
|
||||||
return message;
|
return message;
|
||||||
}
|
}
|
||||||
toObject() {
|
toObject() {
|
||||||
const data: {
|
const data: {
|
||||||
cctvOfStationControlStorages?: ReturnType<typeof CCTVOfStationControlStorage.prototype.toObject>[];
|
cctvOfStationControlStorages?: ReturnType<typeof CCTVOfStationControlStorage.prototype.toObject>[];
|
||||||
fasPlatformAlarmStorages?: ReturnType<typeof FASPlatformAlarmStorage.prototype.toObject>[];
|
fasOfPlatformAlarmStorages?: ReturnType<typeof FASOfPlatformAlarmStorage.prototype.toObject>[];
|
||||||
} = {};
|
} = {};
|
||||||
if (this.cctvOfStationControlStorages != null) {
|
if (this.cctvOfStationControlStorages != null) {
|
||||||
data.cctvOfStationControlStorages = this.cctvOfStationControlStorages.map((item: CCTVOfStationControlStorage) => item.toObject());
|
data.cctvOfStationControlStorages = this.cctvOfStationControlStorages.map((item: CCTVOfStationControlStorage) => item.toObject());
|
||||||
}
|
}
|
||||||
if (this.fasPlatformAlarmStorages != null) {
|
if (this.fasOfPlatformAlarmStorages != null) {
|
||||||
data.fasPlatformAlarmStorages = this.fasPlatformAlarmStorages.map((item: FASPlatformAlarmStorage) => item.toObject());
|
data.fasOfPlatformAlarmStorages = this.fasOfPlatformAlarmStorages.map((item: FASOfPlatformAlarmStorage) => item.toObject());
|
||||||
}
|
}
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
@ -67,8 +67,8 @@ export namespace iscsGraphicData {
|
|||||||
const writer = w || new pb_1.BinaryWriter();
|
const writer = w || new pb_1.BinaryWriter();
|
||||||
if (this.cctvOfStationControlStorages.length)
|
if (this.cctvOfStationControlStorages.length)
|
||||||
writer.writeRepeatedMessage(1, this.cctvOfStationControlStorages, (item: CCTVOfStationControlStorage) => item.serialize(writer));
|
writer.writeRepeatedMessage(1, this.cctvOfStationControlStorages, (item: CCTVOfStationControlStorage) => item.serialize(writer));
|
||||||
if (this.fasPlatformAlarmStorages.length)
|
if (this.fasOfPlatformAlarmStorages.length)
|
||||||
writer.writeRepeatedMessage(2, this.fasPlatformAlarmStorages, (item: FASPlatformAlarmStorage) => item.serialize(writer));
|
writer.writeRepeatedMessage(2, this.fasOfPlatformAlarmStorages, (item: FASOfPlatformAlarmStorage) => item.serialize(writer));
|
||||||
if (!w)
|
if (!w)
|
||||||
return writer.getResultBuffer();
|
return writer.getResultBuffer();
|
||||||
}
|
}
|
||||||
@ -82,7 +82,7 @@ export namespace iscsGraphicData {
|
|||||||
reader.readMessage(message.cctvOfStationControlStorages, () => pb_1.Message.addToRepeatedWrapperField(message, 1, CCTVOfStationControlStorage.deserialize(reader), CCTVOfStationControlStorage));
|
reader.readMessage(message.cctvOfStationControlStorages, () => pb_1.Message.addToRepeatedWrapperField(message, 1, CCTVOfStationControlStorage.deserialize(reader), CCTVOfStationControlStorage));
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
reader.readMessage(message.fasPlatformAlarmStorages, () => pb_1.Message.addToRepeatedWrapperField(message, 2, FASPlatformAlarmStorage.deserialize(reader), FASPlatformAlarmStorage));
|
reader.readMessage(message.fasOfPlatformAlarmStorages, () => pb_1.Message.addToRepeatedWrapperField(message, 2, FASOfPlatformAlarmStorage.deserialize(reader), FASOfPlatformAlarmStorage));
|
||||||
break;
|
break;
|
||||||
default: reader.skipField();
|
default: reader.skipField();
|
||||||
}
|
}
|
||||||
@ -209,6 +209,142 @@ export namespace iscsGraphicData {
|
|||||||
return UniqueIdOfStationLayout.deserialize(bytes);
|
return UniqueIdOfStationLayout.deserialize(bytes);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
export class CommonGraphicStorage extends pb_1.Message {
|
||||||
|
#one_of_decls: number[][] = [];
|
||||||
|
constructor(data?: any[] | {
|
||||||
|
arrows?: Arrow[];
|
||||||
|
texts?: Text[];
|
||||||
|
rects?: Rect[];
|
||||||
|
lines?: Line[];
|
||||||
|
}) {
|
||||||
|
super();
|
||||||
|
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [1, 2, 3, 4], this.#one_of_decls);
|
||||||
|
if (!Array.isArray(data) && typeof data == "object") {
|
||||||
|
if ("arrows" in data && data.arrows != undefined) {
|
||||||
|
this.arrows = data.arrows;
|
||||||
|
}
|
||||||
|
if ("texts" in data && data.texts != undefined) {
|
||||||
|
this.texts = data.texts;
|
||||||
|
}
|
||||||
|
if ("rects" in data && data.rects != undefined) {
|
||||||
|
this.rects = data.rects;
|
||||||
|
}
|
||||||
|
if ("lines" in data && data.lines != undefined) {
|
||||||
|
this.lines = data.lines;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
get arrows() {
|
||||||
|
return pb_1.Message.getRepeatedWrapperField(this, Arrow, 1) as Arrow[];
|
||||||
|
}
|
||||||
|
set arrows(value: Arrow[]) {
|
||||||
|
pb_1.Message.setRepeatedWrapperField(this, 1, value);
|
||||||
|
}
|
||||||
|
get texts() {
|
||||||
|
return pb_1.Message.getRepeatedWrapperField(this, Text, 2) as Text[];
|
||||||
|
}
|
||||||
|
set texts(value: Text[]) {
|
||||||
|
pb_1.Message.setRepeatedWrapperField(this, 2, value);
|
||||||
|
}
|
||||||
|
get rects() {
|
||||||
|
return pb_1.Message.getRepeatedWrapperField(this, Rect, 3) as Rect[];
|
||||||
|
}
|
||||||
|
set rects(value: Rect[]) {
|
||||||
|
pb_1.Message.setRepeatedWrapperField(this, 3, value);
|
||||||
|
}
|
||||||
|
get lines() {
|
||||||
|
return pb_1.Message.getRepeatedWrapperField(this, Line, 4) as Line[];
|
||||||
|
}
|
||||||
|
set lines(value: Line[]) {
|
||||||
|
pb_1.Message.setRepeatedWrapperField(this, 4, value);
|
||||||
|
}
|
||||||
|
static fromObject(data: {
|
||||||
|
arrows?: ReturnType<typeof Arrow.prototype.toObject>[];
|
||||||
|
texts?: ReturnType<typeof Text.prototype.toObject>[];
|
||||||
|
rects?: ReturnType<typeof Rect.prototype.toObject>[];
|
||||||
|
lines?: ReturnType<typeof Line.prototype.toObject>[];
|
||||||
|
}): CommonGraphicStorage {
|
||||||
|
const message = new CommonGraphicStorage({});
|
||||||
|
if (data.arrows != null) {
|
||||||
|
message.arrows = data.arrows.map(item => Arrow.fromObject(item));
|
||||||
|
}
|
||||||
|
if (data.texts != null) {
|
||||||
|
message.texts = data.texts.map(item => Text.fromObject(item));
|
||||||
|
}
|
||||||
|
if (data.rects != null) {
|
||||||
|
message.rects = data.rects.map(item => Rect.fromObject(item));
|
||||||
|
}
|
||||||
|
if (data.lines != null) {
|
||||||
|
message.lines = data.lines.map(item => Line.fromObject(item));
|
||||||
|
}
|
||||||
|
return message;
|
||||||
|
}
|
||||||
|
toObject() {
|
||||||
|
const data: {
|
||||||
|
arrows?: ReturnType<typeof Arrow.prototype.toObject>[];
|
||||||
|
texts?: ReturnType<typeof Text.prototype.toObject>[];
|
||||||
|
rects?: ReturnType<typeof Rect.prototype.toObject>[];
|
||||||
|
lines?: ReturnType<typeof Line.prototype.toObject>[];
|
||||||
|
} = {};
|
||||||
|
if (this.arrows != null) {
|
||||||
|
data.arrows = this.arrows.map((item: Arrow) => item.toObject());
|
||||||
|
}
|
||||||
|
if (this.texts != null) {
|
||||||
|
data.texts = this.texts.map((item: Text) => item.toObject());
|
||||||
|
}
|
||||||
|
if (this.rects != null) {
|
||||||
|
data.rects = this.rects.map((item: Rect) => item.toObject());
|
||||||
|
}
|
||||||
|
if (this.lines != null) {
|
||||||
|
data.lines = this.lines.map((item: Line) => item.toObject());
|
||||||
|
}
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
serialize(): Uint8Array;
|
||||||
|
serialize(w: pb_1.BinaryWriter): void;
|
||||||
|
serialize(w?: pb_1.BinaryWriter): Uint8Array | void {
|
||||||
|
const writer = w || new pb_1.BinaryWriter();
|
||||||
|
if (this.arrows.length)
|
||||||
|
writer.writeRepeatedMessage(1, this.arrows, (item: Arrow) => item.serialize(writer));
|
||||||
|
if (this.texts.length)
|
||||||
|
writer.writeRepeatedMessage(2, this.texts, (item: Text) => item.serialize(writer));
|
||||||
|
if (this.rects.length)
|
||||||
|
writer.writeRepeatedMessage(3, this.rects, (item: Rect) => item.serialize(writer));
|
||||||
|
if (this.lines.length)
|
||||||
|
writer.writeRepeatedMessage(4, this.lines, (item: Line) => item.serialize(writer));
|
||||||
|
if (!w)
|
||||||
|
return writer.getResultBuffer();
|
||||||
|
}
|
||||||
|
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): CommonGraphicStorage {
|
||||||
|
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new CommonGraphicStorage();
|
||||||
|
while (reader.nextField()) {
|
||||||
|
if (reader.isEndGroup())
|
||||||
|
break;
|
||||||
|
switch (reader.getFieldNumber()) {
|
||||||
|
case 1:
|
||||||
|
reader.readMessage(message.arrows, () => pb_1.Message.addToRepeatedWrapperField(message, 1, Arrow.deserialize(reader), Arrow));
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
reader.readMessage(message.texts, () => pb_1.Message.addToRepeatedWrapperField(message, 2, Text.deserialize(reader), Text));
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
reader.readMessage(message.rects, () => pb_1.Message.addToRepeatedWrapperField(message, 3, Rect.deserialize(reader), Rect));
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
reader.readMessage(message.lines, () => pb_1.Message.addToRepeatedWrapperField(message, 4, Line.deserialize(reader), Line));
|
||||||
|
break;
|
||||||
|
default: reader.skipField();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return message;
|
||||||
|
}
|
||||||
|
serializeBinary(): Uint8Array {
|
||||||
|
return this.serialize();
|
||||||
|
}
|
||||||
|
static deserializeBinary(bytes: Uint8Array): CommonGraphicStorage {
|
||||||
|
return CommonGraphicStorage.deserialize(bytes);
|
||||||
|
}
|
||||||
|
}
|
||||||
export class Arrow extends pb_1.Message {
|
export class Arrow extends pb_1.Message {
|
||||||
#one_of_decls: number[][] = [];
|
#one_of_decls: number[][] = [];
|
||||||
constructor(data?: any[] | {
|
constructor(data?: any[] | {
|
||||||
@ -325,7 +461,7 @@ export namespace iscsGraphicData {
|
|||||||
return Arrow.deserialize(bytes);
|
return Arrow.deserialize(bytes);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
export class IscsText extends pb_1.Message {
|
export class Text extends pb_1.Message {
|
||||||
#one_of_decls: number[][] = [];
|
#one_of_decls: number[][] = [];
|
||||||
constructor(data?: any[] | {
|
constructor(data?: any[] | {
|
||||||
common?: dependency_1.common.CommonInfo;
|
common?: dependency_1.common.CommonInfo;
|
||||||
@ -393,8 +529,8 @@ export namespace iscsGraphicData {
|
|||||||
content?: string;
|
content?: string;
|
||||||
color?: string;
|
color?: string;
|
||||||
fontSize?: number;
|
fontSize?: number;
|
||||||
}): IscsText {
|
}): Text {
|
||||||
const message = new IscsText({});
|
const message = new Text({});
|
||||||
if (data.common != null) {
|
if (data.common != null) {
|
||||||
message.common = dependency_1.common.CommonInfo.fromObject(data.common);
|
message.common = dependency_1.common.CommonInfo.fromObject(data.common);
|
||||||
}
|
}
|
||||||
@ -454,8 +590,8 @@ export namespace iscsGraphicData {
|
|||||||
if (!w)
|
if (!w)
|
||||||
return writer.getResultBuffer();
|
return writer.getResultBuffer();
|
||||||
}
|
}
|
||||||
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): IscsText {
|
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Text {
|
||||||
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new IscsText();
|
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Text();
|
||||||
while (reader.nextField()) {
|
while (reader.nextField()) {
|
||||||
if (reader.isEndGroup())
|
if (reader.isEndGroup())
|
||||||
break;
|
break;
|
||||||
@ -483,8 +619,8 @@ export namespace iscsGraphicData {
|
|||||||
serializeBinary(): Uint8Array {
|
serializeBinary(): Uint8Array {
|
||||||
return this.serialize();
|
return this.serialize();
|
||||||
}
|
}
|
||||||
static deserializeBinary(bytes: Uint8Array): IscsText {
|
static deserializeBinary(bytes: Uint8Array): Text {
|
||||||
return IscsText.deserialize(bytes);
|
return Text.deserialize(bytes);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
export class Rect extends pb_1.Message {
|
export class Rect extends pb_1.Message {
|
||||||
@ -498,6 +634,8 @@ export namespace iscsGraphicData {
|
|||||||
height?: number;
|
height?: number;
|
||||||
radius?: number;
|
radius?: number;
|
||||||
point?: dependency_1.common.Point;
|
point?: dependency_1.common.Point;
|
||||||
|
fillColor?: string;
|
||||||
|
alpha?: number;
|
||||||
}) {
|
}) {
|
||||||
super();
|
super();
|
||||||
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
|
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
|
||||||
@ -526,6 +664,12 @@ export namespace iscsGraphicData {
|
|||||||
if ("point" in data && data.point != undefined) {
|
if ("point" in data && data.point != undefined) {
|
||||||
this.point = data.point;
|
this.point = data.point;
|
||||||
}
|
}
|
||||||
|
if ("fillColor" in data && data.fillColor != undefined) {
|
||||||
|
this.fillColor = data.fillColor;
|
||||||
|
}
|
||||||
|
if ("alpha" in data && data.alpha != undefined) {
|
||||||
|
this.alpha = data.alpha;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
get common() {
|
get common() {
|
||||||
@ -582,6 +726,18 @@ export namespace iscsGraphicData {
|
|||||||
get has_point() {
|
get has_point() {
|
||||||
return pb_1.Message.getField(this, 8) != null;
|
return pb_1.Message.getField(this, 8) != null;
|
||||||
}
|
}
|
||||||
|
get fillColor() {
|
||||||
|
return pb_1.Message.getFieldWithDefault(this, 9, "") as string;
|
||||||
|
}
|
||||||
|
set fillColor(value: string) {
|
||||||
|
pb_1.Message.setField(this, 9, value);
|
||||||
|
}
|
||||||
|
get alpha() {
|
||||||
|
return pb_1.Message.getFieldWithDefault(this, 10, 0) as number;
|
||||||
|
}
|
||||||
|
set alpha(value: number) {
|
||||||
|
pb_1.Message.setField(this, 10, value);
|
||||||
|
}
|
||||||
static fromObject(data: {
|
static fromObject(data: {
|
||||||
common?: ReturnType<typeof dependency_1.common.CommonInfo.prototype.toObject>;
|
common?: ReturnType<typeof dependency_1.common.CommonInfo.prototype.toObject>;
|
||||||
code?: string;
|
code?: string;
|
||||||
@ -591,6 +747,8 @@ export namespace iscsGraphicData {
|
|||||||
height?: number;
|
height?: number;
|
||||||
radius?: number;
|
radius?: number;
|
||||||
point?: ReturnType<typeof dependency_1.common.Point.prototype.toObject>;
|
point?: ReturnType<typeof dependency_1.common.Point.prototype.toObject>;
|
||||||
|
fillColor?: string;
|
||||||
|
alpha?: number;
|
||||||
}): Rect {
|
}): Rect {
|
||||||
const message = new Rect({});
|
const message = new Rect({});
|
||||||
if (data.common != null) {
|
if (data.common != null) {
|
||||||
@ -617,6 +775,12 @@ export namespace iscsGraphicData {
|
|||||||
if (data.point != null) {
|
if (data.point != null) {
|
||||||
message.point = dependency_1.common.Point.fromObject(data.point);
|
message.point = dependency_1.common.Point.fromObject(data.point);
|
||||||
}
|
}
|
||||||
|
if (data.fillColor != null) {
|
||||||
|
message.fillColor = data.fillColor;
|
||||||
|
}
|
||||||
|
if (data.alpha != null) {
|
||||||
|
message.alpha = data.alpha;
|
||||||
|
}
|
||||||
return message;
|
return message;
|
||||||
}
|
}
|
||||||
toObject() {
|
toObject() {
|
||||||
@ -629,6 +793,8 @@ export namespace iscsGraphicData {
|
|||||||
height?: number;
|
height?: number;
|
||||||
radius?: number;
|
radius?: number;
|
||||||
point?: ReturnType<typeof dependency_1.common.Point.prototype.toObject>;
|
point?: ReturnType<typeof dependency_1.common.Point.prototype.toObject>;
|
||||||
|
fillColor?: string;
|
||||||
|
alpha?: number;
|
||||||
} = {};
|
} = {};
|
||||||
if (this.common != null) {
|
if (this.common != null) {
|
||||||
data.common = this.common.toObject();
|
data.common = this.common.toObject();
|
||||||
@ -654,6 +820,12 @@ export namespace iscsGraphicData {
|
|||||||
if (this.point != null) {
|
if (this.point != null) {
|
||||||
data.point = this.point.toObject();
|
data.point = this.point.toObject();
|
||||||
}
|
}
|
||||||
|
if (this.fillColor != null) {
|
||||||
|
data.fillColor = this.fillColor;
|
||||||
|
}
|
||||||
|
if (this.alpha != null) {
|
||||||
|
data.alpha = this.alpha;
|
||||||
|
}
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
serialize(): Uint8Array;
|
serialize(): Uint8Array;
|
||||||
@ -676,6 +848,10 @@ export namespace iscsGraphicData {
|
|||||||
writer.writeInt32(7, this.radius);
|
writer.writeInt32(7, this.radius);
|
||||||
if (this.has_point)
|
if (this.has_point)
|
||||||
writer.writeMessage(8, this.point, () => this.point.serialize(writer));
|
writer.writeMessage(8, this.point, () => this.point.serialize(writer));
|
||||||
|
if (this.fillColor.length)
|
||||||
|
writer.writeString(9, this.fillColor);
|
||||||
|
if (this.alpha != 0)
|
||||||
|
writer.writeFloat(10, this.alpha);
|
||||||
if (!w)
|
if (!w)
|
||||||
return writer.getResultBuffer();
|
return writer.getResultBuffer();
|
||||||
}
|
}
|
||||||
@ -709,6 +885,12 @@ export namespace iscsGraphicData {
|
|||||||
case 8:
|
case 8:
|
||||||
reader.readMessage(message.point, () => message.point = dependency_1.common.Point.deserialize(reader));
|
reader.readMessage(message.point, () => message.point = dependency_1.common.Point.deserialize(reader));
|
||||||
break;
|
break;
|
||||||
|
case 9:
|
||||||
|
message.fillColor = reader.readString();
|
||||||
|
break;
|
||||||
|
case 10:
|
||||||
|
message.alpha = reader.readFloat();
|
||||||
|
break;
|
||||||
default: reader.skipField();
|
default: reader.skipField();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1522,14 +1704,11 @@ export namespace iscsGraphicData {
|
|||||||
constructor(data?: any[] | {
|
constructor(data?: any[] | {
|
||||||
stationName?: string;
|
stationName?: string;
|
||||||
canvas?: dependency_1.common.Canvas;
|
canvas?: dependency_1.common.Canvas;
|
||||||
arrows?: Arrow[];
|
commonGraphicStorage?: CommonGraphicStorage;
|
||||||
iscsTexts?: IscsText[];
|
|
||||||
rects?: Rect[];
|
|
||||||
cctvButtons?: CCTVButton[];
|
cctvButtons?: CCTVButton[];
|
||||||
lines?: Line[];
|
|
||||||
}) {
|
}) {
|
||||||
super();
|
super();
|
||||||
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [3, 4, 5, 6, 7], this.#one_of_decls);
|
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [4], this.#one_of_decls);
|
||||||
if (!Array.isArray(data) && typeof data == "object") {
|
if (!Array.isArray(data) && typeof data == "object") {
|
||||||
if ("stationName" in data && data.stationName != undefined) {
|
if ("stationName" in data && data.stationName != undefined) {
|
||||||
this.stationName = data.stationName;
|
this.stationName = data.stationName;
|
||||||
@ -1537,21 +1716,12 @@ export namespace iscsGraphicData {
|
|||||||
if ("canvas" in data && data.canvas != undefined) {
|
if ("canvas" in data && data.canvas != undefined) {
|
||||||
this.canvas = data.canvas;
|
this.canvas = data.canvas;
|
||||||
}
|
}
|
||||||
if ("arrows" in data && data.arrows != undefined) {
|
if ("commonGraphicStorage" in data && data.commonGraphicStorage != undefined) {
|
||||||
this.arrows = data.arrows;
|
this.commonGraphicStorage = data.commonGraphicStorage;
|
||||||
}
|
|
||||||
if ("iscsTexts" in data && data.iscsTexts != undefined) {
|
|
||||||
this.iscsTexts = data.iscsTexts;
|
|
||||||
}
|
|
||||||
if ("rects" in data && data.rects != undefined) {
|
|
||||||
this.rects = data.rects;
|
|
||||||
}
|
}
|
||||||
if ("cctvButtons" in data && data.cctvButtons != undefined) {
|
if ("cctvButtons" in data && data.cctvButtons != undefined) {
|
||||||
this.cctvButtons = data.cctvButtons;
|
this.cctvButtons = data.cctvButtons;
|
||||||
}
|
}
|
||||||
if ("lines" in data && data.lines != undefined) {
|
|
||||||
this.lines = data.lines;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
get stationName() {
|
get stationName() {
|
||||||
@ -1569,44 +1739,26 @@ export namespace iscsGraphicData {
|
|||||||
get has_canvas() {
|
get has_canvas() {
|
||||||
return pb_1.Message.getField(this, 2) != null;
|
return pb_1.Message.getField(this, 2) != null;
|
||||||
}
|
}
|
||||||
get arrows() {
|
get commonGraphicStorage() {
|
||||||
return pb_1.Message.getRepeatedWrapperField(this, Arrow, 3) as Arrow[];
|
return pb_1.Message.getWrapperField(this, CommonGraphicStorage, 3) as CommonGraphicStorage;
|
||||||
}
|
}
|
||||||
set arrows(value: Arrow[]) {
|
set commonGraphicStorage(value: CommonGraphicStorage) {
|
||||||
pb_1.Message.setRepeatedWrapperField(this, 3, value);
|
pb_1.Message.setWrapperField(this, 3, value);
|
||||||
}
|
}
|
||||||
get iscsTexts() {
|
get has_commonGraphicStorage() {
|
||||||
return pb_1.Message.getRepeatedWrapperField(this, IscsText, 4) as IscsText[];
|
return pb_1.Message.getField(this, 3) != null;
|
||||||
}
|
|
||||||
set iscsTexts(value: IscsText[]) {
|
|
||||||
pb_1.Message.setRepeatedWrapperField(this, 4, value);
|
|
||||||
}
|
|
||||||
get rects() {
|
|
||||||
return pb_1.Message.getRepeatedWrapperField(this, Rect, 5) as Rect[];
|
|
||||||
}
|
|
||||||
set rects(value: Rect[]) {
|
|
||||||
pb_1.Message.setRepeatedWrapperField(this, 5, value);
|
|
||||||
}
|
}
|
||||||
get cctvButtons() {
|
get cctvButtons() {
|
||||||
return pb_1.Message.getRepeatedWrapperField(this, CCTVButton, 6) as CCTVButton[];
|
return pb_1.Message.getRepeatedWrapperField(this, CCTVButton, 4) as CCTVButton[];
|
||||||
}
|
}
|
||||||
set cctvButtons(value: CCTVButton[]) {
|
set cctvButtons(value: CCTVButton[]) {
|
||||||
pb_1.Message.setRepeatedWrapperField(this, 6, value);
|
pb_1.Message.setRepeatedWrapperField(this, 4, value);
|
||||||
}
|
|
||||||
get lines() {
|
|
||||||
return pb_1.Message.getRepeatedWrapperField(this, Line, 7) as Line[];
|
|
||||||
}
|
|
||||||
set lines(value: Line[]) {
|
|
||||||
pb_1.Message.setRepeatedWrapperField(this, 7, value);
|
|
||||||
}
|
}
|
||||||
static fromObject(data: {
|
static fromObject(data: {
|
||||||
stationName?: string;
|
stationName?: string;
|
||||||
canvas?: ReturnType<typeof dependency_1.common.Canvas.prototype.toObject>;
|
canvas?: ReturnType<typeof dependency_1.common.Canvas.prototype.toObject>;
|
||||||
arrows?: ReturnType<typeof Arrow.prototype.toObject>[];
|
commonGraphicStorage?: ReturnType<typeof CommonGraphicStorage.prototype.toObject>;
|
||||||
iscsTexts?: ReturnType<typeof IscsText.prototype.toObject>[];
|
|
||||||
rects?: ReturnType<typeof Rect.prototype.toObject>[];
|
|
||||||
cctvButtons?: ReturnType<typeof CCTVButton.prototype.toObject>[];
|
cctvButtons?: ReturnType<typeof CCTVButton.prototype.toObject>[];
|
||||||
lines?: ReturnType<typeof Line.prototype.toObject>[];
|
|
||||||
}): CCTVOfStationControlStorage {
|
}): CCTVOfStationControlStorage {
|
||||||
const message = new CCTVOfStationControlStorage({});
|
const message = new CCTVOfStationControlStorage({});
|
||||||
if (data.stationName != null) {
|
if (data.stationName != null) {
|
||||||
@ -1615,32 +1767,20 @@ export namespace iscsGraphicData {
|
|||||||
if (data.canvas != null) {
|
if (data.canvas != null) {
|
||||||
message.canvas = dependency_1.common.Canvas.fromObject(data.canvas);
|
message.canvas = dependency_1.common.Canvas.fromObject(data.canvas);
|
||||||
}
|
}
|
||||||
if (data.arrows != null) {
|
if (data.commonGraphicStorage != null) {
|
||||||
message.arrows = data.arrows.map(item => Arrow.fromObject(item));
|
message.commonGraphicStorage = CommonGraphicStorage.fromObject(data.commonGraphicStorage);
|
||||||
}
|
|
||||||
if (data.iscsTexts != null) {
|
|
||||||
message.iscsTexts = data.iscsTexts.map(item => IscsText.fromObject(item));
|
|
||||||
}
|
|
||||||
if (data.rects != null) {
|
|
||||||
message.rects = data.rects.map(item => Rect.fromObject(item));
|
|
||||||
}
|
}
|
||||||
if (data.cctvButtons != null) {
|
if (data.cctvButtons != null) {
|
||||||
message.cctvButtons = data.cctvButtons.map(item => CCTVButton.fromObject(item));
|
message.cctvButtons = data.cctvButtons.map(item => CCTVButton.fromObject(item));
|
||||||
}
|
}
|
||||||
if (data.lines != null) {
|
|
||||||
message.lines = data.lines.map(item => Line.fromObject(item));
|
|
||||||
}
|
|
||||||
return message;
|
return message;
|
||||||
}
|
}
|
||||||
toObject() {
|
toObject() {
|
||||||
const data: {
|
const data: {
|
||||||
stationName?: string;
|
stationName?: string;
|
||||||
canvas?: ReturnType<typeof dependency_1.common.Canvas.prototype.toObject>;
|
canvas?: ReturnType<typeof dependency_1.common.Canvas.prototype.toObject>;
|
||||||
arrows?: ReturnType<typeof Arrow.prototype.toObject>[];
|
commonGraphicStorage?: ReturnType<typeof CommonGraphicStorage.prototype.toObject>;
|
||||||
iscsTexts?: ReturnType<typeof IscsText.prototype.toObject>[];
|
|
||||||
rects?: ReturnType<typeof Rect.prototype.toObject>[];
|
|
||||||
cctvButtons?: ReturnType<typeof CCTVButton.prototype.toObject>[];
|
cctvButtons?: ReturnType<typeof CCTVButton.prototype.toObject>[];
|
||||||
lines?: ReturnType<typeof Line.prototype.toObject>[];
|
|
||||||
} = {};
|
} = {};
|
||||||
if (this.stationName != null) {
|
if (this.stationName != null) {
|
||||||
data.stationName = this.stationName;
|
data.stationName = this.stationName;
|
||||||
@ -1648,21 +1788,12 @@ export namespace iscsGraphicData {
|
|||||||
if (this.canvas != null) {
|
if (this.canvas != null) {
|
||||||
data.canvas = this.canvas.toObject();
|
data.canvas = this.canvas.toObject();
|
||||||
}
|
}
|
||||||
if (this.arrows != null) {
|
if (this.commonGraphicStorage != null) {
|
||||||
data.arrows = this.arrows.map((item: Arrow) => item.toObject());
|
data.commonGraphicStorage = this.commonGraphicStorage.toObject();
|
||||||
}
|
|
||||||
if (this.iscsTexts != null) {
|
|
||||||
data.iscsTexts = this.iscsTexts.map((item: IscsText) => item.toObject());
|
|
||||||
}
|
|
||||||
if (this.rects != null) {
|
|
||||||
data.rects = this.rects.map((item: Rect) => item.toObject());
|
|
||||||
}
|
}
|
||||||
if (this.cctvButtons != null) {
|
if (this.cctvButtons != null) {
|
||||||
data.cctvButtons = this.cctvButtons.map((item: CCTVButton) => item.toObject());
|
data.cctvButtons = this.cctvButtons.map((item: CCTVButton) => item.toObject());
|
||||||
}
|
}
|
||||||
if (this.lines != null) {
|
|
||||||
data.lines = this.lines.map((item: Line) => item.toObject());
|
|
||||||
}
|
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
serialize(): Uint8Array;
|
serialize(): Uint8Array;
|
||||||
@ -1673,16 +1804,10 @@ export namespace iscsGraphicData {
|
|||||||
writer.writeString(1, this.stationName);
|
writer.writeString(1, this.stationName);
|
||||||
if (this.has_canvas)
|
if (this.has_canvas)
|
||||||
writer.writeMessage(2, this.canvas, () => this.canvas.serialize(writer));
|
writer.writeMessage(2, this.canvas, () => this.canvas.serialize(writer));
|
||||||
if (this.arrows.length)
|
if (this.has_commonGraphicStorage)
|
||||||
writer.writeRepeatedMessage(3, this.arrows, (item: Arrow) => item.serialize(writer));
|
writer.writeMessage(3, this.commonGraphicStorage, () => this.commonGraphicStorage.serialize(writer));
|
||||||
if (this.iscsTexts.length)
|
|
||||||
writer.writeRepeatedMessage(4, this.iscsTexts, (item: IscsText) => item.serialize(writer));
|
|
||||||
if (this.rects.length)
|
|
||||||
writer.writeRepeatedMessage(5, this.rects, (item: Rect) => item.serialize(writer));
|
|
||||||
if (this.cctvButtons.length)
|
if (this.cctvButtons.length)
|
||||||
writer.writeRepeatedMessage(6, this.cctvButtons, (item: CCTVButton) => item.serialize(writer));
|
writer.writeRepeatedMessage(4, this.cctvButtons, (item: CCTVButton) => item.serialize(writer));
|
||||||
if (this.lines.length)
|
|
||||||
writer.writeRepeatedMessage(7, this.lines, (item: Line) => item.serialize(writer));
|
|
||||||
if (!w)
|
if (!w)
|
||||||
return writer.getResultBuffer();
|
return writer.getResultBuffer();
|
||||||
}
|
}
|
||||||
@ -1699,19 +1824,10 @@ export namespace iscsGraphicData {
|
|||||||
reader.readMessage(message.canvas, () => message.canvas = dependency_1.common.Canvas.deserialize(reader));
|
reader.readMessage(message.canvas, () => message.canvas = dependency_1.common.Canvas.deserialize(reader));
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
reader.readMessage(message.arrows, () => pb_1.Message.addToRepeatedWrapperField(message, 3, Arrow.deserialize(reader), Arrow));
|
reader.readMessage(message.commonGraphicStorage, () => message.commonGraphicStorage = CommonGraphicStorage.deserialize(reader));
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
reader.readMessage(message.iscsTexts, () => pb_1.Message.addToRepeatedWrapperField(message, 4, IscsText.deserialize(reader), IscsText));
|
reader.readMessage(message.cctvButtons, () => pb_1.Message.addToRepeatedWrapperField(message, 4, CCTVButton.deserialize(reader), CCTVButton));
|
||||||
break;
|
|
||||||
case 5:
|
|
||||||
reader.readMessage(message.rects, () => pb_1.Message.addToRepeatedWrapperField(message, 5, Rect.deserialize(reader), Rect));
|
|
||||||
break;
|
|
||||||
case 6:
|
|
||||||
reader.readMessage(message.cctvButtons, () => pb_1.Message.addToRepeatedWrapperField(message, 6, CCTVButton.deserialize(reader), CCTVButton));
|
|
||||||
break;
|
|
||||||
case 7:
|
|
||||||
reader.readMessage(message.lines, () => pb_1.Message.addToRepeatedWrapperField(message, 7, Line.deserialize(reader), Line));
|
|
||||||
break;
|
break;
|
||||||
default: reader.skipField();
|
default: reader.skipField();
|
||||||
}
|
}
|
||||||
@ -1725,18 +1841,15 @@ export namespace iscsGraphicData {
|
|||||||
return CCTVOfStationControlStorage.deserialize(bytes);
|
return CCTVOfStationControlStorage.deserialize(bytes);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
export class FASPlatformAlarmStorage extends pb_1.Message {
|
export class FASOfPlatformAlarmStorage extends pb_1.Message {
|
||||||
#one_of_decls: number[][] = [];
|
#one_of_decls: number[][] = [];
|
||||||
constructor(data?: any[] | {
|
constructor(data?: any[] | {
|
||||||
stationName?: string;
|
stationName?: string;
|
||||||
canvas?: dependency_1.common.Canvas;
|
canvas?: dependency_1.common.Canvas;
|
||||||
arrows?: Arrow[];
|
commonGraphicStorage?: CommonGraphicStorage;
|
||||||
iscsTexts?: IscsText[];
|
|
||||||
rects?: Rect[];
|
|
||||||
lines?: Line[];
|
|
||||||
}) {
|
}) {
|
||||||
super();
|
super();
|
||||||
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [3, 4, 5, 6], this.#one_of_decls);
|
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
|
||||||
if (!Array.isArray(data) && typeof data == "object") {
|
if (!Array.isArray(data) && typeof data == "object") {
|
||||||
if ("stationName" in data && data.stationName != undefined) {
|
if ("stationName" in data && data.stationName != undefined) {
|
||||||
this.stationName = data.stationName;
|
this.stationName = data.stationName;
|
||||||
@ -1744,17 +1857,8 @@ export namespace iscsGraphicData {
|
|||||||
if ("canvas" in data && data.canvas != undefined) {
|
if ("canvas" in data && data.canvas != undefined) {
|
||||||
this.canvas = data.canvas;
|
this.canvas = data.canvas;
|
||||||
}
|
}
|
||||||
if ("arrows" in data && data.arrows != undefined) {
|
if ("commonGraphicStorage" in data && data.commonGraphicStorage != undefined) {
|
||||||
this.arrows = data.arrows;
|
this.commonGraphicStorage = data.commonGraphicStorage;
|
||||||
}
|
|
||||||
if ("iscsTexts" in data && data.iscsTexts != undefined) {
|
|
||||||
this.iscsTexts = data.iscsTexts;
|
|
||||||
}
|
|
||||||
if ("rects" in data && data.rects != undefined) {
|
|
||||||
this.rects = data.rects;
|
|
||||||
}
|
|
||||||
if ("lines" in data && data.lines != undefined) {
|
|
||||||
this.lines = data.lines;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1773,56 +1877,29 @@ export namespace iscsGraphicData {
|
|||||||
get has_canvas() {
|
get has_canvas() {
|
||||||
return pb_1.Message.getField(this, 2) != null;
|
return pb_1.Message.getField(this, 2) != null;
|
||||||
}
|
}
|
||||||
get arrows() {
|
get commonGraphicStorage() {
|
||||||
return pb_1.Message.getRepeatedWrapperField(this, Arrow, 3) as Arrow[];
|
return pb_1.Message.getWrapperField(this, CommonGraphicStorage, 3) as CommonGraphicStorage;
|
||||||
}
|
}
|
||||||
set arrows(value: Arrow[]) {
|
set commonGraphicStorage(value: CommonGraphicStorage) {
|
||||||
pb_1.Message.setRepeatedWrapperField(this, 3, value);
|
pb_1.Message.setWrapperField(this, 3, value);
|
||||||
}
|
}
|
||||||
get iscsTexts() {
|
get has_commonGraphicStorage() {
|
||||||
return pb_1.Message.getRepeatedWrapperField(this, IscsText, 4) as IscsText[];
|
return pb_1.Message.getField(this, 3) != null;
|
||||||
}
|
|
||||||
set iscsTexts(value: IscsText[]) {
|
|
||||||
pb_1.Message.setRepeatedWrapperField(this, 4, value);
|
|
||||||
}
|
|
||||||
get rects() {
|
|
||||||
return pb_1.Message.getRepeatedWrapperField(this, Rect, 5) as Rect[];
|
|
||||||
}
|
|
||||||
set rects(value: Rect[]) {
|
|
||||||
pb_1.Message.setRepeatedWrapperField(this, 5, value);
|
|
||||||
}
|
|
||||||
get lines() {
|
|
||||||
return pb_1.Message.getRepeatedWrapperField(this, Line, 6) as Line[];
|
|
||||||
}
|
|
||||||
set lines(value: Line[]) {
|
|
||||||
pb_1.Message.setRepeatedWrapperField(this, 6, value);
|
|
||||||
}
|
}
|
||||||
static fromObject(data: {
|
static fromObject(data: {
|
||||||
stationName?: string;
|
stationName?: string;
|
||||||
canvas?: ReturnType<typeof dependency_1.common.Canvas.prototype.toObject>;
|
canvas?: ReturnType<typeof dependency_1.common.Canvas.prototype.toObject>;
|
||||||
arrows?: ReturnType<typeof Arrow.prototype.toObject>[];
|
commonGraphicStorage?: ReturnType<typeof CommonGraphicStorage.prototype.toObject>;
|
||||||
iscsTexts?: ReturnType<typeof IscsText.prototype.toObject>[];
|
}): FASOfPlatformAlarmStorage {
|
||||||
rects?: ReturnType<typeof Rect.prototype.toObject>[];
|
const message = new FASOfPlatformAlarmStorage({});
|
||||||
lines?: ReturnType<typeof Line.prototype.toObject>[];
|
|
||||||
}): FASPlatformAlarmStorage {
|
|
||||||
const message = new FASPlatformAlarmStorage({});
|
|
||||||
if (data.stationName != null) {
|
if (data.stationName != null) {
|
||||||
message.stationName = data.stationName;
|
message.stationName = data.stationName;
|
||||||
}
|
}
|
||||||
if (data.canvas != null) {
|
if (data.canvas != null) {
|
||||||
message.canvas = dependency_1.common.Canvas.fromObject(data.canvas);
|
message.canvas = dependency_1.common.Canvas.fromObject(data.canvas);
|
||||||
}
|
}
|
||||||
if (data.arrows != null) {
|
if (data.commonGraphicStorage != null) {
|
||||||
message.arrows = data.arrows.map(item => Arrow.fromObject(item));
|
message.commonGraphicStorage = CommonGraphicStorage.fromObject(data.commonGraphicStorage);
|
||||||
}
|
|
||||||
if (data.iscsTexts != null) {
|
|
||||||
message.iscsTexts = data.iscsTexts.map(item => IscsText.fromObject(item));
|
|
||||||
}
|
|
||||||
if (data.rects != null) {
|
|
||||||
message.rects = data.rects.map(item => Rect.fromObject(item));
|
|
||||||
}
|
|
||||||
if (data.lines != null) {
|
|
||||||
message.lines = data.lines.map(item => Line.fromObject(item));
|
|
||||||
}
|
}
|
||||||
return message;
|
return message;
|
||||||
}
|
}
|
||||||
@ -1830,10 +1907,7 @@ export namespace iscsGraphicData {
|
|||||||
const data: {
|
const data: {
|
||||||
stationName?: string;
|
stationName?: string;
|
||||||
canvas?: ReturnType<typeof dependency_1.common.Canvas.prototype.toObject>;
|
canvas?: ReturnType<typeof dependency_1.common.Canvas.prototype.toObject>;
|
||||||
arrows?: ReturnType<typeof Arrow.prototype.toObject>[];
|
commonGraphicStorage?: ReturnType<typeof CommonGraphicStorage.prototype.toObject>;
|
||||||
iscsTexts?: ReturnType<typeof IscsText.prototype.toObject>[];
|
|
||||||
rects?: ReturnType<typeof Rect.prototype.toObject>[];
|
|
||||||
lines?: ReturnType<typeof Line.prototype.toObject>[];
|
|
||||||
} = {};
|
} = {};
|
||||||
if (this.stationName != null) {
|
if (this.stationName != null) {
|
||||||
data.stationName = this.stationName;
|
data.stationName = this.stationName;
|
||||||
@ -1841,17 +1915,8 @@ export namespace iscsGraphicData {
|
|||||||
if (this.canvas != null) {
|
if (this.canvas != null) {
|
||||||
data.canvas = this.canvas.toObject();
|
data.canvas = this.canvas.toObject();
|
||||||
}
|
}
|
||||||
if (this.arrows != null) {
|
if (this.commonGraphicStorage != null) {
|
||||||
data.arrows = this.arrows.map((item: Arrow) => item.toObject());
|
data.commonGraphicStorage = this.commonGraphicStorage.toObject();
|
||||||
}
|
|
||||||
if (this.iscsTexts != null) {
|
|
||||||
data.iscsTexts = this.iscsTexts.map((item: IscsText) => item.toObject());
|
|
||||||
}
|
|
||||||
if (this.rects != null) {
|
|
||||||
data.rects = this.rects.map((item: Rect) => item.toObject());
|
|
||||||
}
|
|
||||||
if (this.lines != null) {
|
|
||||||
data.lines = this.lines.map((item: Line) => item.toObject());
|
|
||||||
}
|
}
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
@ -1863,19 +1928,13 @@ export namespace iscsGraphicData {
|
|||||||
writer.writeString(1, this.stationName);
|
writer.writeString(1, this.stationName);
|
||||||
if (this.has_canvas)
|
if (this.has_canvas)
|
||||||
writer.writeMessage(2, this.canvas, () => this.canvas.serialize(writer));
|
writer.writeMessage(2, this.canvas, () => this.canvas.serialize(writer));
|
||||||
if (this.arrows.length)
|
if (this.has_commonGraphicStorage)
|
||||||
writer.writeRepeatedMessage(3, this.arrows, (item: Arrow) => item.serialize(writer));
|
writer.writeMessage(3, this.commonGraphicStorage, () => this.commonGraphicStorage.serialize(writer));
|
||||||
if (this.iscsTexts.length)
|
|
||||||
writer.writeRepeatedMessage(4, this.iscsTexts, (item: IscsText) => item.serialize(writer));
|
|
||||||
if (this.rects.length)
|
|
||||||
writer.writeRepeatedMessage(5, this.rects, (item: Rect) => item.serialize(writer));
|
|
||||||
if (this.lines.length)
|
|
||||||
writer.writeRepeatedMessage(6, this.lines, (item: Line) => item.serialize(writer));
|
|
||||||
if (!w)
|
if (!w)
|
||||||
return writer.getResultBuffer();
|
return writer.getResultBuffer();
|
||||||
}
|
}
|
||||||
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): FASPlatformAlarmStorage {
|
static deserialize(bytes: Uint8Array | pb_1.BinaryReader): FASOfPlatformAlarmStorage {
|
||||||
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new FASPlatformAlarmStorage();
|
const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new FASOfPlatformAlarmStorage();
|
||||||
while (reader.nextField()) {
|
while (reader.nextField()) {
|
||||||
if (reader.isEndGroup())
|
if (reader.isEndGroup())
|
||||||
break;
|
break;
|
||||||
@ -1887,16 +1946,7 @@ export namespace iscsGraphicData {
|
|||||||
reader.readMessage(message.canvas, () => message.canvas = dependency_1.common.Canvas.deserialize(reader));
|
reader.readMessage(message.canvas, () => message.canvas = dependency_1.common.Canvas.deserialize(reader));
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
reader.readMessage(message.arrows, () => pb_1.Message.addToRepeatedWrapperField(message, 3, Arrow.deserialize(reader), Arrow));
|
reader.readMessage(message.commonGraphicStorage, () => message.commonGraphicStorage = CommonGraphicStorage.deserialize(reader));
|
||||||
break;
|
|
||||||
case 4:
|
|
||||||
reader.readMessage(message.iscsTexts, () => pb_1.Message.addToRepeatedWrapperField(message, 4, IscsText.deserialize(reader), IscsText));
|
|
||||||
break;
|
|
||||||
case 5:
|
|
||||||
reader.readMessage(message.rects, () => pb_1.Message.addToRepeatedWrapperField(message, 5, Rect.deserialize(reader), Rect));
|
|
||||||
break;
|
|
||||||
case 6:
|
|
||||||
reader.readMessage(message.lines, () => pb_1.Message.addToRepeatedWrapperField(message, 6, Line.deserialize(reader), Line));
|
|
||||||
break;
|
break;
|
||||||
default: reader.skipField();
|
default: reader.skipField();
|
||||||
}
|
}
|
||||||
@ -1906,8 +1956,8 @@ export namespace iscsGraphicData {
|
|||||||
serializeBinary(): Uint8Array {
|
serializeBinary(): Uint8Array {
|
||||||
return this.serialize();
|
return this.serialize();
|
||||||
}
|
}
|
||||||
static deserializeBinary(bytes: Uint8Array): FASPlatformAlarmStorage {
|
static deserializeBinary(bytes: Uint8Array): FASOfPlatformAlarmStorage {
|
||||||
return FASPlatformAlarmStorage.deserialize(bytes);
|
return FASOfPlatformAlarmStorage.deserialize(bytes);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2528,9 +2528,9 @@ isobject@^3.0.1:
|
|||||||
resolved "https://mirrors.huaweicloud.com/repository/npm/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df"
|
resolved "https://mirrors.huaweicloud.com/repository/npm/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df"
|
||||||
integrity sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==
|
integrity sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==
|
||||||
|
|
||||||
"jl-graphic@git+https://gitea.joylink.club/joylink/graphic-pixi.git#v0.1.15":
|
"jl-graphic@git+https://gitea.joylink.club/joylink/graphic-pixi.git#v0.1.18":
|
||||||
version "0.1.14"
|
version "0.1.16"
|
||||||
resolved "git+https://gitea.joylink.club/joylink/graphic-pixi.git#8b0ad14f7324a5eaba58239645a1fa0452e87ab4"
|
resolved "git+https://gitea.joylink.club/joylink/graphic-pixi.git#38045a10271f81b65820db402051fefc62b0a2cd"
|
||||||
dependencies:
|
dependencies:
|
||||||
"@pixi/graphics-extras" "^7.3.2"
|
"@pixi/graphics-extras" "^7.3.2"
|
||||||
"@pixi/utils" "^7.3.2"
|
"@pixi/utils" "^7.3.2"
|
||||||
|
Loading…
Reference in New Issue
Block a user