框架更新

This commit is contained in:
Yuan 2023-12-14 14:18:09 +08:00
parent 40387363ba
commit 57ed5d9ffe
203 changed files with 1474 additions and 11545 deletions

4
.gitmodules vendored
View File

@ -1,7 +1,3 @@
[submodule "bj-rtss-message"]
path = bj-rtss-message
url = ../bj-rtss-message.git
[submodule "graphic-pixi"]
path = graphic-pixi
url = ../../jl-framework/graphic-pixi.git
branch = bj-rtss

@ -1 +1 @@
Subproject commit 9c1d8889e2b0fdcc3f931259a8d2ebc2952285a4
Subproject commit b68103fcf0d9a505a605675b8cebb6ca1bf5c533

@ -1 +0,0 @@
Subproject commit 1db512545467327f783f5e05bd3a1da654355ba2

View File

@ -17,19 +17,14 @@
"sync": "node scripts/sync.cjs"
},
"dependencies": {
"@pixi/filter-outline": "^5.2.0",
"@pixi/graphics-extras": "^7.2.4",
"@quasar/extras": "^1.0.0",
"@stomp/stompjs": "^7.0.0",
"axios": "^1.2.1",
"default-passive-events": "^2.0.0",
"echarts": "^5.4.3",
"google-protobuf": "^3.21.2",
"jl-graphic": "git+ssh://git.code.tencent.com:jl-framework/graphic-pixi.git",
"js-base64": "^3.7.5",
"mqtt": "^5.2.1",
"pinia": "^2.0.11",
"pixi-viewport": "^5.0.1",
"pixi.js": "^7.2.4",
"quasar": "^2.6.0",
"vue": "^3.0.0",
"vue-router": "^4.0.0"

View File

@ -1,70 +0,0 @@
/**
* 同步图形框架文件到 src/jl-graphic/
*/
const {
readdirSync,
existsSync,
copyFileSync,
mkdirSync,
rmSync,
} = require('fs');
const { resolve } = require('path');
const jlGraphicSrcPath = resolve(__dirname, '../graphic-pixi/src/jlgraphic');
const jlGraphicLibPath = resolve(__dirname, '../src/jl-graphic');
/**
* 检查并初始化当前项目引入的jl-graphic库
*/
function checkAndInitJlGraphicLib() {
const exist = existsSync(jlGraphicLibPath);
if (exist) {
console.log('jl-graphic文件夹已存在,清空');
readdirSync(jlGraphicLibPath, {
withFileTypes: true,
}).forEach((file) => {
if (file.isDirectory()) {
rmSync(resolve(jlGraphicLibPath, file.name), { recursive: true });
} else {
rmSync(resolve(jlGraphicLibPath, file.name));
}
});
} else {
console.log('jl-graphic文件夹不存在,创建');
// 文件夹不存在,创建
mkdirSync(jlGraphicLibPath);
}
}
function copyJlGraphicFiles() {
readdirSync(jlGraphicSrcPath, {
withFileTypes: true,
}).forEach((file) => {
recursiveCopyFiles(file);
});
}
function recursiveCopyFiles(file, path = []) {
if (file.isFile()) {
const fileSrcPath = resolve(jlGraphicSrcPath, ...path, file.name);
const fileDestPath = resolve(jlGraphicLibPath, ...path, file.name);
console.log(`copy file ${fileSrcPath} -> ${fileDestPath}`);
copyFileSync(fileSrcPath, fileDestPath);
} else if (file.isDirectory()) {
const srcDir = resolve(jlGraphicSrcPath, ...path, file.name);
const dirPath = resolve(jlGraphicLibPath, ...path, file.name);
mkdirSync(dirPath);
readdirSync(srcDir, {
withFileTypes: true,
}).forEach((subFile) => {
recursiveCopyFiles(subFile, [...path, file.name]);
});
}
}
function main() {
checkAndInitJlGraphicLib();
copyJlGraphicFiles();
}
main();

View File

@ -1,5 +1,5 @@
import { type GraphicDataBase } from 'src/drawApp/graphics/GraphicDataBase';
import { IDrawApp } from 'src/jl-graphic';
import { IDrawApp } from 'jl-graphic';
import { onMounted, onUnmounted, reactive, toRaw } from 'vue';
export function useFormData<T extends GraphicDataBase>(

View File

@ -64,7 +64,7 @@
<script setup lang="ts">
import { inject, ref, watch } from 'vue';
import { IDrawApp, JlGraphic } from 'src/jl-graphic';
import { IDrawApp, JlGraphic } from 'jl-graphic';
const props = withDefaults(
defineProps<{

View File

@ -83,8 +83,7 @@
import { computed, onMounted, ref, watch } from 'vue';
import { useLineStore } from 'src/stores/line-store';
import DraggableDialog from 'src/components/common/DraggableDialog.vue';
import { JlDrawApp } from 'src/jl-graphic/app/JlDrawApp';
import { GraphicApp } from 'src/jl-graphic/app/JlGraphicApp';
import { IDrawApp, IGraphicApp } from 'jl-graphic';
interface ItemData {
label: string;
@ -101,7 +100,7 @@ const props = defineProps<{
showDialog: boolean;
layerList: ItemData[];
showLayer: string[];
app: JlDrawApp | GraphicApp;
app: IDrawApp | IGraphicApp;
noSelect?: boolean; // tab
}>();

View File

@ -36,7 +36,7 @@
<script setup lang="ts">
import { onMounted, ref, provide } from 'vue';
import { QForm, useQuasar } from 'quasar';
import { JlGraphic } from 'src/jl-graphic';
import { JlGraphic } from 'jl-graphic';
import { useDrawStore } from 'src/stores/draw-store';
import { graphicData } from 'src/protos/stationLayoutGraphics';
import { Turnout } from 'src/graphics/turnout/Turnout';

View File

@ -115,7 +115,7 @@ import { AxleCountingData } from 'src/drawApp/graphics/AxleCountingInteraction';
import { AxleCounting } from 'src/graphics/axleCounting/AxleCounting';
import { Section } from 'src/graphics/section/Section';
import { Turnout } from 'src/graphics/turnout/Turnout';
import { getRectangleCenter, GraphicIdGenerator } from 'src/jl-graphic';
import { getRectangleCenter, GraphicIdGenerator } from 'jl-graphic';
import { useDrawStore } from 'src/stores/draw-store';
import { computed } from 'vue';
import { useQuasar } from 'quasar';

View File

@ -68,7 +68,7 @@
<script setup lang="ts">
import { onMounted, onUnmounted, ref, watch } from 'vue';
import { QForm, useQuasar } from 'quasar';
import { JlGraphic } from 'src/jl-graphic';
import { JlGraphic } from 'jl-graphic';
import {
CiCjConfigCeil,
useRelayCabinetStore,

View File

@ -59,7 +59,7 @@
<script setup lang="ts">
import { onMounted, onUnmounted, ref, watch } from 'vue';
import { QForm, useQuasar } from 'quasar';
import { JlGraphic } from 'src/jl-graphic';
import { JlGraphic } from 'jl-graphic';
import {
CiCjConfigCeil,
useRelayCabinetStore,

View File

@ -71,7 +71,7 @@ import {
loadOtherLineList,
} from 'src/drawApp/commonApp';
import { useDrawStore } from 'src/stores/draw-store';
import { GraphicData, JlGraphic } from 'src/jl-graphic';
import { GraphicData, JlGraphic } from 'jl-graphic';
const $q = useQuasar();
const showRangeConfig = ref(true);

View File

@ -56,7 +56,7 @@
<script setup lang="ts">
import { onMounted, ref, watch } from 'vue';
import { QForm, useQuasar } from 'quasar';
import { JlGraphic } from 'src/jl-graphic';
import { JlGraphic } from 'jl-graphic';
import { usePslDrawStore } from 'src/stores/psl-draw-store';
import { PslKey } from 'src/graphics/pslKey/pslKey';
import { PslButton } from 'src/graphics/pslButton/pslButton';
@ -100,7 +100,7 @@ watch(
pslDrawStore.getDrawApp().updateSelected(...selectGraphic);
relateDeviceConfig.value.refDevicesCode = selectGraphic.map((g) =>
(g as PslKey | PslButton | PslLight).datas.code == ''
? g.id+''
? g.id + ''
: (g as PslKey | PslButton | PslLight).datas.code
);
relateDeviceConfig.value.refDevices = selectGraphic.map(

View File

@ -1,7 +1,7 @@
<script setup lang="ts">
import { onMounted, ref, watch } from 'vue';
import { QForm, useQuasar } from 'quasar';
import { JlGraphic } from 'src/jl-graphic';
import { JlGraphic } from 'jl-graphic';
import { useIBPDrawStore } from 'src/stores/ibp-draw-store';
import { graphicData } from 'src/protos/stationLayoutGraphics';
import { IbpAlarm } from 'src/graphics/ibpAlarm/IbpAlarm';

View File

@ -40,7 +40,7 @@
<script setup lang="ts">
import { onMounted, provide, ref } from 'vue';
import { QForm, useQuasar } from 'quasar';
import { JlGraphic } from 'src/jl-graphic';
import { JlGraphic } from 'jl-graphic';
import { useRelayCabinetStore } from 'src/stores/relayCabinet-store';
import { Relay } from 'src/graphics/relay/Relay';
import { relayCabinetGraphicData } from 'src/protos/relayCabinetLayoutGraphics';

View File

@ -39,7 +39,7 @@
<script setup lang="ts">
import { onMounted, provide, ref } from 'vue';
import { QForm, useQuasar } from 'quasar';
import { JlGraphic } from 'src/jl-graphic';
import { JlGraphic } from 'jl-graphic';
import { useDrawStore } from 'src/stores/draw-store';
import { EsbButton } from 'src/graphics/esbButton/EsbButton';
import {

View File

@ -150,7 +150,7 @@ import { ScreenDoor } from 'src/graphics/screenDoor/ScreenDoor';
import { ScreenDoorData } from 'src/drawApp/graphics/ScreenDoorInteraction';
import { Platform } from 'src/graphics/platform/Platform';
import { PlatformData } from 'src/drawApp/graphics/PlatformInteraction';
import { JlGraphic } from 'src/jl-graphic';
import { JlGraphic } from 'jl-graphic';
import {
findCommonElements,
handleCentralizedStationsData,

View File

@ -212,7 +212,7 @@ import { useQuasar } from 'quasar';
import { ApiError } from 'src/boot/axios';
import { request } from 'src/protos/request';
import { TurnoutStates } from 'src/drawApp/graphics/TurnoutInteraction';
import { JlGraphic } from 'src/jl-graphic';
import { JlGraphic } from 'jl-graphic';
const $q = useQuasar();
const lineStore = useLineStore();

View File

@ -6,7 +6,7 @@ import {
IGraphicApp,
IGraphicScene,
IGraphicStorage,
} from 'src/jl-graphic';
} from 'jl-graphic';
import { ibpGraphicData } from 'src/protos/ibpGraphics';
import { useIbpStore } from 'src/stores/ibp-store';
import { IbpLightData, IbpLightState } from './graphics/IbpLightInteraction';

View File

@ -1,9 +1,7 @@
import { TrainTemplate } from 'src/graphics/train/Train';
import { TrainDraw } from 'src/graphics/train/TrainDrawAssistant';
import { Signal, SignalTemplate } from 'src/graphics/signal/Signal';
import { GraphicData, IDrawApp } from 'src/jl-graphic';
import { ContextMenu } from 'src/jl-graphic/ui/ContextMenu';
import { MenuItemOptions } from 'src/jl-graphic/ui/Menu';
import { GraphicData, IDrawApp, ContextMenu, MenuItemOptions } from 'jl-graphic';
import { TrainState } from './graphics/TrainInteraction';
import {
SignalData,

View File

@ -5,10 +5,9 @@ import {
GraphicInteractionPlugin,
JlGraphic,
IGraphicScene,
} from 'src/jl-graphic';
import { ContextMenu } from 'src/jl-graphic/ui/ContextMenu';
import { MenuItemOptions } from 'src/jl-graphic/ui/Menu';
MenuItemOptions,
ContextMenu,
} from 'jl-graphic';
import { graphicData } from 'src/protos/stationLayoutGraphics';
import { GraphicDataBase, GraphicStateBase } from './GraphicDataBase';
import { useLineStore } from 'src/stores/line-store';
@ -21,8 +20,7 @@ import {
export class AutoReturnBoxData
extends GraphicDataBase
implements IAutoReturnBoxData
{
implements IAutoReturnBoxData {
constructor(data?: graphicData.AutoReturnBox) {
let autoReturnBox;
if (!data) {
@ -69,8 +67,7 @@ export class AutoReturnBoxData
export class AutoReturnBoxState
extends GraphicStateBase
implements IAutoReturnBoxState
{
implements IAutoReturnBoxState {
constructor(data?: state.ButtonState) {
let ibpButtonState;
if (data) {

View File

@ -5,9 +5,9 @@ import {
IGraphicApp,
GraphicInteractionPlugin,
JlGraphic,
} from 'src/jl-graphic';
import { ContextMenu } from 'src/jl-graphic/ui/ContextMenu';
import { MenuItemOptions } from 'src/jl-graphic/ui/Menu';
MenuItemOptions,
ContextMenu,
} from 'jl-graphic';
import { graphicData } from 'src/protos/stationLayoutGraphics';
import { GraphicDataBase } from './GraphicDataBase';

View File

@ -10,9 +10,9 @@ import {
GraphicInteractionPlugin,
JlGraphic,
IGraphicScene,
} from 'src/jl-graphic';
import { ContextMenu } from 'src/jl-graphic/ui/ContextMenu';
import { MenuItemOptions } from 'src/jl-graphic/ui/Menu';
MenuItemOptions,
ContextMenu,
} from 'jl-graphic';
import { graphicData } from 'src/protos/stationLayoutGraphics';
import { GraphicDataBase, GraphicStateBase } from './GraphicDataBase';
@ -66,8 +66,7 @@ export class EsbButtonData extends GraphicDataBase implements IEsbButtonData {
export class EsbButtonState
extends GraphicStateBase
implements IEsbButtonState
{
implements IEsbButtonState {
constructor(data?: state.ButtonState) {
let ibpButtonState;
if (data) {

View File

@ -6,9 +6,9 @@ import {
GraphicInteractionPlugin,
JlGraphic,
IGraphicScene,
} from 'src/jl-graphic';
import { ContextMenu } from 'src/jl-graphic/ui/ContextMenu';
import { MenuItemOptions } from 'src/jl-graphic/ui/Menu';
MenuItemOptions,
ContextMenu,
} from 'jl-graphic';
import { graphicData } from 'src/protos/stationLayoutGraphics';
import { GraphicDataBase } from './GraphicDataBase';

View File

@ -6,7 +6,7 @@ import {
GraphicTransform,
IChildTransform,
IGraphicTransform,
} from 'src/jl-graphic';
} from 'jl-graphic';
// import { toStorageTransform } from '..';
import { graphicData } from 'src/protos/stationLayoutGraphics';
import { IPointData, Point } from 'pixi.js';

View File

@ -10,7 +10,7 @@ import {
GraphicInteractionPlugin,
IGraphicScene,
JlGraphic,
} from 'src/jl-graphic';
} from 'jl-graphic';
import { FederatedMouseEvent } from 'pixi.js';
import { state } from 'src/protos/device_state';
import { useIbpStore } from 'src/stores/ibp-store';
@ -67,8 +67,7 @@ export class IBPButtonData extends GraphicDataBase implements IIBPButtonData {
export class IbpButtonState
extends GraphicStateBase
implements IIbpButtonState
{
implements IIbpButtonState {
constructor(data?: state.ButtonState) {
let ibpButtonState;
if (data) {

View File

@ -7,7 +7,7 @@ import {
GraphicInteractionPlugin,
IGraphicScene,
JlGraphic,
} from 'src/jl-graphic';
} from 'jl-graphic';
import { type FederatedMouseEvent } from 'pixi.js';
import { useIbpStore } from 'src/stores/ibp-store';

View File

@ -11,7 +11,7 @@ import {
IGraphicScene,
GraphicInteractionPlugin,
JlGraphic,
} from 'src/jl-graphic';
} from 'jl-graphic';
import { useLineStore } from 'src/stores/line-store';
export class PlatformData extends GraphicDataBase implements IPlatformData {

View File

@ -8,7 +8,7 @@ import {
GraphicInteractionPlugin,
IGraphicScene,
JlGraphic,
} from 'src/jl-graphic';
} from 'jl-graphic';
import { pslGraphicData } from 'src/protos/pslGraphics';
import { GraphicDataBase, GraphicStateBase } from './GraphicDataBase';
import { pslOperate } from 'src/api/Simulation';
@ -65,8 +65,7 @@ export class PslButtonData extends GraphicDataBase implements IPslButtonData {
}
export class PslButtonState
extends GraphicStateBase
implements IPslButtonState
{
implements IPslButtonState {
constructor(proto?: state.ButtonState) {
let states;
if (proto) {

View File

@ -12,7 +12,7 @@ import {
GraphicInteractionPlugin,
IGraphicScene,
JlGraphic,
} from 'src/jl-graphic';
} from 'jl-graphic';
import { loadScreenDoorConfig } from '../commonApp';
export class ScreenDoorData extends GraphicDataBase implements IScreenDoorData {
@ -60,8 +60,7 @@ export class ScreenDoorData extends GraphicDataBase implements IScreenDoorData {
export class ScreenDoorState
extends GraphicStateBase
implements IScreenDoorState
{
implements IScreenDoorState {
constructor(proto?: state.PsdState) {
let states;
if (proto) {

View File

@ -12,15 +12,15 @@ import {
GraphicInteractionPlugin,
IGraphicScene,
JlGraphic,
} from 'src/jl-graphic';
MenuItemOptions,
ContextMenu,
} from 'jl-graphic';
import { useLineStore } from 'src/stores/line-store';
import { SectionGraphicHitArea } from 'src/graphics/section/SectionDrawAssistant';
import { Dialog, Notify } from 'quasar';
import AddTrainDialog from '../../components/draw-app/dialogs/AddTrainDialog.vue';
import { addTrain } from 'src/api/Simulation';
import { successNotify } from '../../utils/CommonNotify';
import { MenuItemOptions } from 'src/jl-graphic/ui/Menu';
import { ContextMenu } from 'src/jl-graphic/ui/ContextMenu';
import { AxleCounting } from 'src/graphics/axleCounting/AxleCounting';
import { ApiError } from 'src/boot/axios';
import { state } from 'src/protos/device_state';
@ -251,7 +251,7 @@ export class SectionOperateInteraction extends GraphicInteractionPlugin<Section>
if (
(other.datas.axleCountingRef.length > 1 &&
other.datas.type ==
graphicData.AxleCounting.TypeDetectionPoint.AxleCounting) ||
graphicData.AxleCounting.TypeDetectionPoint.AxleCounting) ||
other.datas.axleCountingRef.length == 1
) {
if (rp.getParam() == 'A') {

View File

@ -10,13 +10,12 @@ import {
IGraphicScene,
GraphicInteractionPlugin,
JlGraphic,
} from 'src/jl-graphic';
} from 'jl-graphic';
import { useLineStore } from 'src/stores/line-store';
import { SectionLinkGraphicHitArea } from 'src/graphics/sectionLink/SectionLinkDrawAssistant';
export class SectionLinkData
extends GraphicDataBase
implements ISectionLinkData
{
implements ISectionLinkData {
constructor(data?: graphicData.SectionLink) {
let sectionLink;
if (!data) {

View File

@ -11,9 +11,9 @@ import {
GraphicInteractionPlugin,
IGraphicScene,
JlGraphic,
} from 'src/jl-graphic';
import { ContextMenu } from 'src/jl-graphic/ui/ContextMenu';
import { MenuItemOptions } from 'src/jl-graphic/ui/Menu';
MenuItemOptions,
ContextMenu,
} from 'jl-graphic';
import { FederatedMouseEvent, DisplayObject } from 'pixi.js';
import { state } from 'src/protos/device_state';
import { useLineStore } from 'src/stores/line-store';

View File

@ -9,9 +9,9 @@ import {
GraphicInteractionPlugin,
JlGraphic,
IGraphicScene,
} from 'src/jl-graphic';
import { ContextMenu } from 'src/jl-graphic/ui/ContextMenu';
import { MenuItemOptions } from 'src/jl-graphic/ui/Menu';
MenuItemOptions,
ContextMenu,
} from 'jl-graphic';
import { graphicData } from 'src/protos/stationLayoutGraphics';
import { GraphicDataBase } from './GraphicDataBase';

View File

@ -11,7 +11,7 @@ import {
IGraphicScene,
GraphicInteractionPlugin,
JlGraphic,
} from 'src/jl-graphic';
} from 'jl-graphic';
import { KilometerSystem } from 'src/graphics/signal/Signal';
import { useLineStore } from 'src/stores/line-store';

View File

@ -9,9 +9,9 @@ import {
IGraphicApp,
GraphicInteractionPlugin,
JlGraphic,
} from 'src/jl-graphic';
import { ContextMenu } from 'src/jl-graphic/ui/ContextMenu';
import { MenuItemOptions } from 'src/jl-graphic/ui/Menu';
MenuItemOptions,
ContextMenu,
} from 'jl-graphic';
import { graphicData } from 'src/protos/stationLayoutGraphics';
import { GraphicDataBase } from './GraphicDataBase';

View File

@ -2,13 +2,13 @@ import * as pb_1 from 'google-protobuf';
import { ITrainState, Train } from 'src/graphics/train/Train';
import { GraphicStateBase } from './GraphicDataBase';
import { state } from 'src/protos/device_state';
import { MenuItemOptions } from 'src/jl-graphic/ui/Menu';
import { ContextMenu } from 'src/jl-graphic/ui/ContextMenu';
import {
IGraphicScene,
GraphicInteractionPlugin,
JlGraphic,
} from 'src/jl-graphic';
MenuItemOptions,
ContextMenu,
} from 'jl-graphic';
import { DisplayObject, FederatedMouseEvent } from 'pixi.js';
import { removeTrain, updateTrain } from 'src/api/Simulation';
import { useLineStore } from 'src/stores/line-store';

View File

@ -14,13 +14,13 @@ import {
IGraphicScene,
GraphicInteractionPlugin,
JlGraphic,
} from 'src/jl-graphic';
MenuItemOptions,
ContextMenu,
} from 'jl-graphic';
import {
ForkHitArea,
TurnoutSectionHitArea,
} from 'src/graphics/turnout/TurnoutDrawAssistant';
import { ContextMenu } from 'src/jl-graphic/ui/ContextMenu';
import { MenuItemOptions } from 'src/jl-graphic/ui/Menu';
import { useLineStore } from 'src/stores/line-store';
import { setSwitchPosition } from 'src/api/Simulation';
import { Dialog, Notify } from 'quasar';
@ -127,7 +127,7 @@ export class TurnoutOperationPlugin extends GraphicInteractionPlugin<Turnout> {
rp.getParam() == port &&
((ac.datas.axleCountingRef.length > 1 &&
ac.datas.type ==
graphicData.AxleCounting.TypeDetectionPoint.AxleCounting) ||
graphicData.AxleCounting.TypeDetectionPoint.AxleCounting) ||
ac.datas.axleCountingRef.length == 1)
);
});

View File

@ -10,9 +10,9 @@ import {
GraphicInteractionPlugin,
JlGraphic,
IGraphicScene,
} from 'src/jl-graphic';
import { ContextMenu } from 'src/jl-graphic/ui/ContextMenu';
import { MenuItemOptions } from 'src/jl-graphic/ui/Menu';
MenuItemOptions,
ContextMenu,
} from 'jl-graphic';
import { graphicData } from 'src/protos/stationLayoutGraphics';
import { GraphicDataBase, GraphicStateBase } from './GraphicDataBase';

View File

@ -5,8 +5,8 @@ import {
GraphicData,
IDrawApp,
KeyListener,
newDrawApp,
} from 'src/jl-graphic';
newDrawApp, MenuItemOptions, ContextMenu
} from 'jl-graphic';
import { ibpGraphicData } from 'src/protos/ibpGraphics';
import { useIBPDrawStore } from 'src/stores/ibp-draw-store';
import { IBPButtonData, IbpButtonState } from './graphics/IBPButtonInteraction';
@ -30,8 +30,6 @@ import { ArrowDraw } from 'src/graphics/arrow/ArrowDrawAssistant';
import { ArrowData } from './graphics/ArrowInteraction';
import { TextContentDraw } from 'src/graphics/textContent/TextContentDrawAssistant';
import { IbpTextData } from './graphics/IbpTextInteraction';
import { MenuItemOptions } from 'src/jl-graphic/ui/Menu';
import { ContextMenu } from 'src/jl-graphic/ui/ContextMenu';
import { IbpLightDraw } from 'src/graphics/ibpLight/IbpLightDrawAssistant';
import { IbpLightTempalte } from 'src/graphics/ibpLight/IbpLight';
import { IbpLightData, IbpLightState } from './graphics/IbpLightInteraction';

View File

@ -6,7 +6,7 @@ import {
JlGraphic,
KeyListener,
newDrawApp,
} from 'src/jl-graphic';
} from 'jl-graphic';
import { graphicData } from 'src/protos/stationLayoutGraphics';
import { getDraft } from 'src/api/DraftApi';
import { useDrawStore } from 'src/stores/draw-store';

View File

@ -1,4 +1,4 @@
import { ClientEngine, IGraphicApp, newGraphicApp } from 'src/jl-graphic';
import { ClientEngine, IGraphicApp, newGraphicApp } from 'jl-graphic';
import { initRelayScene } from './relayScene';
import { initLineScene } from './lineScene';
import { initPslScene } from './pslScene';

View File

@ -4,7 +4,10 @@ import {
IGraphicApp,
IGraphicStorage,
GraphicQueryStore,
} from 'src/jl-graphic';
MenuItemOptions,
ContextMenu,
IGraphicScene,
} from 'jl-graphic';
import { TrainState } from './graphics/TrainInteraction';
import { Train, TrainTemplate } from 'src/graphics/train/Train';
import { TrainOperateInteraction } from './graphics/TrainInteraction';
@ -66,8 +69,6 @@ import {
TrainWindowTemplate,
} from 'src/graphics/trainWindow/TrainWindow';
import { TrainWindowData } from './graphics/TrainWindowInteraction';
import { MenuItemOptions } from 'src/jl-graphic/ui/Menu';
import { ContextMenu } from 'src/jl-graphic/ui/ContextMenu';
import {
AxleCountingSection,
AxleCountingSectionTemplate,
@ -131,10 +132,6 @@ import { Curvature, CurvatureTemplate } from 'src/graphics/curvature/Curvature';
import { SlopeData } from './graphics/SlopeInteraction';
import { CurvatureKiloMarkerData } from './graphics/CurvatureKiloMarkerInteraction';
import { CurvatureData } from './graphics/CurvatureInteraction';
import {
GraphicAppOptions,
IGraphicScene,
} from 'src/jl-graphic/app/JlGraphicApp';
import {
TrackSection,
TrackSectionTemplate,
@ -208,7 +205,7 @@ export function getLineScene() {
}
export function initLineScene(lineApp: IGraphicApp, sceneName: string) {
const options: GraphicAppOptions = {
const options = {
dataLoader: loadLineDatas,
};
lineScene = lineApp.initScene(sceneName, options);

View File

@ -5,10 +5,8 @@ import {
IGraphicStorage,
KeyListener,
newDrawApp,
GraphicData,
} from 'src/jl-graphic';
import { ContextMenu } from 'src/jl-graphic/ui/ContextMenu';
import { MenuItemOptions } from 'src/jl-graphic/ui/Menu';
GraphicData, ContextMenu, MenuItemOptions
} from 'jl-graphic';
import { graphicData } from 'src/protos/stationLayoutGraphics';
import { pslGraphicData } from 'src/protos/pslGraphics';
import { saveDraft, getDraft } from 'src/api/DraftApi';

View File

@ -4,7 +4,7 @@ import {
IGraphicApp,
IGraphicScene,
IGraphicStorage,
} from 'src/jl-graphic';
} from 'jl-graphic';
import { getPublishMapInfoByName } from 'src/api/PublishApi';
import { usePslStore } from 'src/stores/psl-store';
import { toUint8Array } from 'js-base64';

View File

@ -4,13 +4,13 @@ import { relayCabinetGraphicData } from 'src/protos/relayCabinetLayoutGraphics';
import { GraphicDataBase, GraphicStateBase } from '../graphics/GraphicDataBase';
import { state } from 'src/protos/device_state';
import { useLineStore } from 'src/stores/line-store';
import { MenuItemOptions } from 'src/jl-graphic/ui/Menu';
import { ContextMenu } from 'src/jl-graphic/ui/ContextMenu';
import {
GraphicInteractionPlugin,
IGraphicScene,
JlGraphic,
} from 'src/jl-graphic';
MenuItemOptions,
ContextMenu,
} from 'jl-graphic';
import { DisplayObject, FederatedMouseEvent } from 'pixi.js';
import { setRelayState } from 'src/api/Simulation';
import { ApiError } from 'src/boot/axios';

View File

@ -7,9 +7,9 @@ import {
IGraphicStorage,
KeyListener,
newDrawApp,
} from 'src/jl-graphic';
import { ContextMenu } from 'src/jl-graphic/ui/ContextMenu';
import { MenuItemOptions } from 'src/jl-graphic/ui/Menu';
MenuItemOptions,
ContextMenu,
} from 'jl-graphic';
import { successNotify, errorNotify } from '../utils/CommonNotify';
import { Dialog } from 'quasar';
import { saveDraft, getDraft } from 'src/api/DraftApi';

View File

@ -5,7 +5,7 @@ import {
IGraphicApp,
IGraphicScene,
IGraphicStorage,
} from 'src/jl-graphic';
} from 'jl-graphic';
import { getPublishMapInfoByLineId } from 'src/api/PublishApi';
import { useLineStore } from 'src/stores/line-store';
import { toUint8Array } from 'js-base64';

View File

@ -5,7 +5,7 @@ import {
IGraphicStorage,
KeyListener,
newDrawApp,
} from 'src/jl-graphic';
} from 'jl-graphic';
import { graphicData } from 'src/protos/stationLayoutGraphics';
import { getDraft } from 'src/api/DraftApi';
import { useDrawStore } from 'src/stores/draw-store';

View File

@ -5,7 +5,7 @@ import {
IGraphicStorage,
KeyListener,
newDrawApp,
} from 'src/jl-graphic';
} from 'jl-graphic';
import { graphicData } from 'src/protos/stationLayoutGraphics';
import { getDraft } from 'src/api/DraftApi';
import { useDrawStore } from 'src/stores/draw-store';

View File

@ -1,5 +1,5 @@
import { Graphics } from 'pixi.js';
import { calculateMirrorPoint } from 'src/jl-graphic';
import { calculateMirrorPoint } from 'jl-graphic';
import { graphicData } from 'src/protos/stationLayoutGraphics';
import { Turnout } from './turnout/Turnout';
import { Section, DevicePort } from './section/Section';

View File

@ -3,7 +3,7 @@ import {
GraphicState,
JlGraphic,
JlGraphicTemplate,
} from 'src/jl-graphic';
} from 'jl-graphic';
import { ibpGraphicData } from 'src/protos/ibpGraphics';
import IPBButtonAssets from './ibpButton.png';
import IBPButtonJSON from './ibpButton.json';

View File

@ -3,7 +3,7 @@ import {
GraphicInteractionPlugin,
IDrawApp,
JlGraphic,
} from 'src/jl-graphic';
} from 'jl-graphic';
import { IBPButton, IBPButtonTemplate, IIBPButtonData } from './IBPButton';
import { FederatedMouseEvent, Point } from 'pixi.js';

View File

@ -1,6 +1,5 @@
import { Graphics, IPointData } from 'pixi.js';
import { GraphicData, JlGraphic, JlGraphicTemplate } from 'src/jl-graphic';
import { ILineGraphic } from 'src/jl-graphic/plugins/GraphicEditPlugin';
import { GraphicData, JlGraphic, JlGraphicTemplate, ILineGraphic } from 'jl-graphic';
export interface IArrowData extends GraphicData {
get code(): string; // 编号

View File

@ -9,7 +9,9 @@ import {
linePoint,
AbsorbablePosition,
AbsorbableLine,
} from 'src/jl-graphic';
ILineGraphic,
PolylineEditPlugin,
} from 'jl-graphic';
import { IArrowData, Arrow, ArrowConsts, ArrowTemplate } from './Arrow';
import {
DisplayObject,
@ -18,10 +20,6 @@ import {
IHitArea,
Point,
} from 'pixi.js';
import {
ILineGraphic,
PolylineEditPlugin,
} from 'src/jl-graphic/plugins/GraphicEditPlugin';
export class ArrowDraw extends GraphicDrawAssistant<ArrowTemplate, IArrowData> {
points: Point[] = [];

View File

@ -5,7 +5,7 @@ import {
JlGraphic,
JlGraphicTemplate,
VectorText,
} from 'src/jl-graphic';
} from 'jl-graphic';
export interface IAutoReturnBoxData extends GraphicData {
get code(): string;

View File

@ -8,7 +8,7 @@ import {
IDrawApp,
JlGraphic,
pointBox,
} from 'src/jl-graphic';
} from 'jl-graphic';
import {
AutoReturnBox,
AutoReturnBoxTemplate,

View File

@ -5,7 +5,7 @@ import {
JlGraphic,
JlGraphicTemplate,
VectorText,
} from 'src/jl-graphic';
} from 'jl-graphic';
import { IRelatedRefData, protoPort2Data } from '../CommonGraphics';
import { KilometerSystem } from '../signal/Signal';

View File

@ -8,7 +8,7 @@ import {
IDrawApp,
JlGraphic,
distance2,
} from 'src/jl-graphic';
} from 'jl-graphic';
import {
IAxleCountingData,
@ -175,8 +175,7 @@ export class AxleCountingDraw extends GraphicDrawAssistant<
});
axleCountingRefs.forEach((axleCountingRef) => {
map.set(
`${axleCountingRef.id}-${
graphicData.RelatedRef.DevicePort[axleCountingRef.devicePort]
`${axleCountingRef.id}-${graphicData.RelatedRef.DevicePort[axleCountingRef.devicePort]
}`,
1
);

View File

@ -6,7 +6,7 @@ import {
JlGraphicTemplate,
VectorText,
calculateLineMidpoint,
} from 'src/jl-graphic';
} from 'jl-graphic';
import { IRelatedRefData, protoPort2Data } from '../CommonGraphics';
import { DevicePort } from '../section/Section';

View File

@ -6,7 +6,7 @@ import {
IDrawApp,
JlGraphic,
linePoint,
} from 'src/jl-graphic';
} from 'jl-graphic';
import {
IAxleCountingSectionData,

View File

@ -4,7 +4,7 @@ import {
JlGraphic,
JlGraphicTemplate,
VectorText,
} from 'src/jl-graphic';
} from 'jl-graphic';
import { graphicData } from 'src/protos/stationLayoutGraphics';
export interface IBeacon extends GraphicData {

View File

@ -7,7 +7,7 @@ import {
GraphicTransformEvent,
IDrawApp,
JlGraphic,
} from 'src/jl-graphic';
} from 'jl-graphic';
import { Beacon, BeaconTemplate, IBeacon } from './Beacon';
export interface IBeaconDrawOptions {

View File

@ -4,9 +4,8 @@ import {
JlGraphic,
JlGraphicTemplate,
calculateDistanceFromPointToLine,
getRectangleCenter,
} from 'src/jl-graphic';
import { ILineGraphic } from 'src/jl-graphic/plugins/GraphicEditPlugin';
getRectangleCenter, ILineGraphic
} from 'jl-graphic';
import { SectionGraphic } from '../sectionGraphic/SectionGraphic';
import { graphicData } from 'src/protos/stationLayoutGraphics';
import { Section, DevicePort, SectionType } from '../section/Section';
@ -45,8 +44,7 @@ enum devicePort {
export class ConcentrationDividingLine
extends JlGraphic
implements ILineGraphic
{
implements ILineGraphic {
static Type = 'ConcentrationDividingLine';
lineGraphic: SectionGraphic;
@ -125,27 +123,27 @@ export class ConcentrationDividingLine
refDevice.localToCanvasPoint(
getRectangleCenter(refDevice.getLocalBounds())
).x <
section.localToCanvasPoint(
getRectangleCenter(section.getLocalBounds())
).x
section.localToCanvasPoint(
getRectangleCenter(section.getLocalBounds())
).x
? [
{
device: refDevice,
port: devicePort[
portRefOtherDevice.devicePort
] as DevicePort,
},
{ device: section, port: relationParam },
]
{
device: refDevice,
port: devicePort[
portRefOtherDevice.devicePort
] as DevicePort,
},
{ device: section, port: relationParam },
]
: [
{ device: section, port: relationParam },
{
device: refDevice,
port: devicePort[
portRefOtherDevice.devicePort
] as DevicePort,
},
];
{ device: section, port: relationParam },
{
device: refDevice,
port: devicePort[
portRefOtherDevice.devicePort
] as DevicePort,
},
];
hasNodeSection.set(leftDevice.device.id, '1');
hasNodeSection.set(rightDevice.device.id, '1');
nodeConWithSecs.push(

View File

@ -5,7 +5,12 @@ import {
IDrawApp,
JlGraphic,
linePoint,
} from 'src/jl-graphic';
PolylineEditPlugin,
addWayPoint,
clearWayPoint,
MenuItemOptions,
ContextMenu
} from 'jl-graphic';
import {
IConcentrationDividingLineData,
ConcentrationDividingLine,
@ -19,13 +24,6 @@ import {
IHitArea,
Point,
} from 'pixi.js';
import {
PolylineEditPlugin,
addWayPoint,
clearWayPoint,
} from 'src/jl-graphic/plugins/GraphicEditPlugin';
import { MenuItemOptions } from 'src/jl-graphic/ui/Menu';
import { ContextMenu } from 'src/jl-graphic/ui/ContextMenu';
import { getWayLineIndex } from '../polygon/PolygonUtils';
export class ConcentrationDividingLineDraw extends GraphicDrawAssistant<

View File

@ -2,7 +2,7 @@ import { IPointData } from 'pixi.js';
import { Section } from '../section/Section';
import { Turnout } from '../turnout/Turnout';
import { graphicData } from 'src/protos/stationLayoutGraphics';
import { IDrawApp, JlGraphic } from 'src/jl-graphic';
import { IDrawApp, JlGraphic } from 'jl-graphic';
import { GraphicDataBase } from 'src/drawApp/graphics/GraphicDataBase';
import { TurnoutData } from 'src/drawApp/graphics/TurnoutInteraction';
import { SectionData } from 'src/drawApp/graphics/SectionInteraction';

View File

@ -5,7 +5,7 @@ import {
JlGraphicTemplate,
VectorText,
calculateLineMidpoint,
} from 'src/jl-graphic';
} from 'jl-graphic';
import { KiloMarkerConsts } from '../kilometerMarker/KilometerMarker';
export interface ICurvatureData extends GraphicData {
get points(): IPointData[]; // 线坐标点

View File

@ -6,7 +6,7 @@ import {
IDrawApp,
JlGraphic,
pointBox,
} from 'src/jl-graphic';
} from 'jl-graphic';
import { ICurvatureData, Curvature, CurvatureTemplate } from './Curvature';
import { CurvatureKiloMarker } from '../curvatureKiloMarker/CurvatureKiloMarker';

View File

@ -1,4 +1,4 @@
import { JlGraphic, JlGraphicTemplate } from 'src/jl-graphic';
import { JlGraphic, JlGraphicTemplate } from 'jl-graphic';
import {
IKiloMarkerData,
KiloMarkerConsts,

View File

@ -5,7 +5,7 @@ import {
IDrawApp,
JlGraphic,
linePoint,
} from 'src/jl-graphic';
} from 'jl-graphic';
import { FederatedMouseEvent, IHitArea, Point } from 'pixi.js';
import { IKiloMarkerData } from '../kilometerMarker/KilometerMarker';
import {

View File

@ -4,7 +4,7 @@ import {
JlGraphic,
JlGraphicTemplate,
VectorText,
} from 'src/jl-graphic';
} from 'jl-graphic';
export interface IDepartureTimer extends GraphicData {
get code(): string;

View File

@ -7,7 +7,7 @@ import {
GraphicTransformEvent,
IDrawApp,
JlGraphic,
} from 'src/jl-graphic';
} from 'jl-graphic';
import {
DepartureTimer,
DepartureTimerTemplate,

View File

@ -5,7 +5,7 @@ import {
JlGraphic,
JlGraphicTemplate,
VectorText,
} from 'src/jl-graphic';
} from 'jl-graphic';
export interface IEsbButtonData extends GraphicData {
get code(): string;

View File

@ -7,7 +7,7 @@ import {
GraphicTransformEvent,
IDrawApp,
JlGraphic,
} from 'src/jl-graphic';
} from 'jl-graphic';
import { EsbButton, EsbButtonTemplate, IEsbButtonData } from './EsbButton';
export interface IEsbButtonDataDrawOptions {

View File

@ -5,7 +5,7 @@ import {
JlGraphic,
JlGraphicTemplate,
VectorText,
} from 'src/jl-graphic';
} from 'jl-graphic';
export interface IZdwxEsbData extends GraphicData {
get code(): string;

View File

@ -7,7 +7,7 @@ import {
GraphicTransformEvent,
IDrawApp,
JlGraphic,
} from 'src/jl-graphic';
} from 'jl-graphic';
import {
ZdwxEsb,
ZdwxEsbTemplate,

View File

@ -4,7 +4,7 @@ import {
JlGraphic,
JlGraphicTemplate,
VectorText,
} from 'src/jl-graphic';
} from 'jl-graphic';
export interface IGatedBox extends GraphicData {
get code(): string;

View File

@ -7,7 +7,7 @@ import {
GraphicTransformEvent,
IDrawApp,
JlGraphic,
} from 'src/jl-graphic';
} from 'jl-graphic';
import { GatedBox, GatedBoxTemplate, IGatedBox } from './GatedBox';
export interface IGatedBoxDrawOptions {

View File

@ -3,7 +3,7 @@ import {
GraphicState,
JlGraphic,
JlGraphicTemplate,
} from 'src/jl-graphic';
} from 'jl-graphic';
import Ibp_Alarm_Assets from './ibp-alarm-spritesheet.png';
import Ibp_Alarm_JSON from './ibp-alarm-data.json';

View File

@ -7,7 +7,7 @@ import {
GraphicTransformEvent,
IDrawApp,
JlGraphic,
} from 'src/jl-graphic';
} from 'jl-graphic';
import { IIbpAlarmData, IbpAlarm, IbpAlarmTemplate } from './IbpAlarm';
export class IbpAlarmDraw extends GraphicDrawAssistant<

View File

@ -3,7 +3,7 @@ import {
GraphicState,
JlGraphic,
JlGraphicTemplate,
} from 'src/jl-graphic';
} from 'jl-graphic';
import Ibp_Key_Assets from './ibp-key-spritesheet.png';
import Ibp_Key_JSON from './ibp-key-data.json';

View File

@ -7,7 +7,7 @@ import {
GraphicTransformEvent,
IDrawApp,
JlGraphic,
} from 'src/jl-graphic';
} from 'jl-graphic';
import { IIbpKeyData, IbpKey, IbpKeyTemplate } from './IbpKey';
export class IbpKeyDraw extends GraphicDrawAssistant<

View File

@ -4,7 +4,7 @@ import {
GraphicState,
JlGraphic,
JlGraphicTemplate,
} from 'src/jl-graphic';
} from 'jl-graphic';
import { ibpGraphicData } from 'src/protos/ibpGraphics';
export interface IIbpLightData extends GraphicData {

View File

@ -6,7 +6,7 @@ import {
GraphicTransformEvent,
IDrawApp,
JlGraphic,
} from 'src/jl-graphic';
} from 'jl-graphic';
import { IIbpLightData, IbpLight, IbpLightTempalte } from './IbpLight';
import { DisplayObject, FederatedMouseEvent, Point } from 'pixi.js';

View File

@ -3,7 +3,7 @@ import {
JlGraphic,
JlGraphicTemplate,
VectorText,
} from 'src/jl-graphic';
} from 'jl-graphic';
import { ibpGraphicData } from 'src/protos/ibpGraphics';
export interface IIbpStationTextData extends GraphicData {

View File

@ -7,7 +7,7 @@ import {
IDrawApp,
JlGraphic,
calculateLineMidpoint,
} from 'src/jl-graphic';
} from 'jl-graphic';
import {
IIbpStationTextData,
IbpStationText,

View File

@ -1,6 +1,6 @@
import { Graphics } from 'pixi.js';
import { KilometerSystem } from '../signal/Signal';
import { GraphicData } from 'src/jl-graphic';
import { GraphicData } from 'jl-graphic';
export const KiloMarkerConsts = {
size: 50,

View File

@ -6,9 +6,8 @@ import {
VectorText,
getNormalVector,
movePointAlongNormal,
GraphicIdGenerator,
} from 'src/jl-graphic';
import { ILineGraphic } from 'src/jl-graphic/plugins/GraphicEditPlugin';
GraphicIdGenerator, ILineGraphic
} from 'jl-graphic';
import { AxleCounting } from '../axleCounting/AxleCounting';
import { IRelatedRefData, DevicePosition } from '../CommonGraphics';
import { Turnout } from '../turnout/Turnout';

View File

@ -6,14 +6,12 @@ import {
JlGraphic,
linePoint,
VectorText,
} from 'src/jl-graphic';
import { ILinkData, Link, LinkConsts, LinkTemplate } from './Link';
import { DisplayObject, Graphics, IHitArea, Point } from 'pixi.js';
import {
PolylineEditPlugin,
ILineGraphic,
IEditPointOptions,
} from 'src/jl-graphic/plugins/GraphicEditPlugin';
} from 'jl-graphic';
import { ILinkData, Link, LinkConsts, LinkTemplate } from './Link';
import { DisplayObject, Graphics, IHitArea, Point } from 'pixi.js';
export class LinkDraw extends GraphicDrawAssistant<LinkTemplate, ILinkData> {
points: Point[] = [];

View File

@ -8,7 +8,7 @@ import {
calculateLineMidpoint,
getNormalVector,
movePointAlongNormal,
} from 'src/jl-graphic';
} from 'jl-graphic';
export interface ILogicSectionData extends GraphicData {
get code(): string; // 编号

View File

@ -13,7 +13,9 @@ import {
JlGraphic,
linePoint,
splitLineEvenly,
} from 'src/jl-graphic';
MenuItemOptions,
ContextMenu
} from 'jl-graphic';
import {
ILogicSectionData,
@ -25,8 +27,6 @@ import { Turnout } from '../turnout/Turnout';
import { LogicSectionData } from 'src/drawApp/graphics/LogicSectionInteraction';
import { AxleCountingSection } from '../axleCountingSection/AxleCountingSection';
import SectionSplitDialog from 'src/components/draw-app/dialogs/SectionSplitDialog.vue';
import { MenuItemOptions } from 'src/jl-graphic/ui/Menu';
import { ContextMenu } from 'src/jl-graphic/ui/ContextMenu';
import { Dialog } from 'quasar';
import { graphicData } from 'src/protos/stationLayoutGraphics';
@ -251,14 +251,14 @@ export class LogicSectionInteraction extends GraphicInteractionPlugin<LogicSecti
if (
(dir === 'ltr' &&
axleCountingSectionData.points[0].x >
axleCountingSectionData.points[
axleCountingSectionData.points.length - 1
].x) ||
axleCountingSectionData.points[
axleCountingSectionData.points.length - 1
].x) ||
(dir === 'rtl' &&
axleCountingSectionData.points[0].x <
axleCountingSectionData.points[
axleCountingSectionData.points.length - 1
].x)
axleCountingSectionData.points[
axleCountingSectionData.points.length - 1
].x)
) {
}
points.forEach((ps) => {

View File

@ -5,7 +5,7 @@ import {
JlGraphicTemplate,
VectorText,
getRectangleCenter,
} from 'src/jl-graphic';
} from 'jl-graphic';
export interface IPhaseFailureProtectorData extends GraphicData {
get code(): string; // 编号

View File

@ -6,7 +6,7 @@ import {
GraphicInteractionPlugin,
IDrawApp,
JlGraphic,
} from 'src/jl-graphic';
} from 'jl-graphic';
import {
IPhaseFailureProtectorData,

View File

@ -6,7 +6,7 @@ import {
JlGraphicTemplate,
distance2,
getRectangleCenter,
} from 'src/jl-graphic';
} from 'jl-graphic';
import { Station } from '../station/Station';
import { Section } from '../section/Section';
import { state } from 'src/protos/device_state';

View File

@ -6,7 +6,7 @@ import {
GraphicInteractionPlugin,
IDrawApp,
JlGraphic,
} from 'src/jl-graphic';
} from 'jl-graphic';
import { IPlatformData, Platform, PlatformTemplate } from './Platform';

View File

@ -1,6 +1,5 @@
import { Graphics, IPointData } from 'pixi.js';
import { GraphicData, JlGraphic, JlGraphicTemplate } from 'src/jl-graphic';
import { ILineGraphic } from 'src/jl-graphic/plugins/GraphicEditPlugin';
import { GraphicData, JlGraphic, JlGraphicTemplate, ILineGraphic } from 'jl-graphic';
import { graphicData } from 'src/protos/stationLayoutGraphics';
export interface IPolygonData extends GraphicData {

View File

@ -5,7 +5,13 @@ import {
IDrawApp,
JlGraphic,
linePoint,
} from 'src/jl-graphic';
PolylineEditPlugin,
addWayPoint,
clearWayPoint,
getWayLineIndex,
MenuItemOptions,
ContextMenu
} from 'jl-graphic';
import {
IPolygonData,
Polygon,
@ -19,14 +25,6 @@ import {
IHitArea,
Point,
} from 'pixi.js';
import {
PolylineEditPlugin,
addWayPoint,
clearWayPoint,
getWayLineIndex,
} from 'src/jl-graphic/plugins/GraphicEditPlugin';
import { MenuItemOptions } from 'src/jl-graphic/ui/Menu';
import { ContextMenu } from 'src/jl-graphic/ui/ContextMenu';
export class PolygonDraw extends GraphicDrawAssistant<
PolygonTemplate,

View File

@ -2,7 +2,7 @@ import { IPointData } from 'pixi.js';
import {
calculateDistanceFromPointToLine,
calculateFootPointFromPointToLine,
} from 'src/jl-graphic';
} from 'jl-graphic';
//获取所选线段的索引
export function getWayLineIndex(
@ -61,7 +61,7 @@ export function isPointInPolygon(point: IPointData, polygon: IPointData[]) {
}
const x =
((point.y - startPoint.y) * (endPoint.x - startPoint.x)) /
(endPoint.y - startPoint.y) +
(endPoint.y - startPoint.y) +
startPoint.x;
if (x > point.x) {
intersections++;

View File

@ -3,7 +3,7 @@ import {
GraphicState,
JlGraphic,
JlGraphicTemplate,
} from 'src/jl-graphic';
} from 'jl-graphic';
import Psl_Button_Assets from './psl-button-spritesheet.png';
import Psl_Button_JSON from './psl-button-data.json';

Some files were not shown because too many files have changed in this diff Show More