@itwin/hypermodeling-frontend 3.7.2 → 3.7.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -1
- package/lib/cjs/HyperModeling.d.ts +114 -114
- package/lib/cjs/HyperModeling.js +240 -240
- package/lib/cjs/HyperModelingConfig.d.ts +54 -54
- package/lib/cjs/HyperModelingConfig.js +9 -9
- package/lib/cjs/HyperModelingConfig.js.map +1 -1
- package/lib/cjs/HyperModelingDecorator.d.ts +110 -110
- package/lib/cjs/HyperModelingDecorator.js +337 -337
- package/lib/cjs/HyperModelingDecorator.js.map +1 -1
- package/lib/cjs/PopupToolbar.d.ts +24 -24
- package/lib/cjs/PopupToolbar.js +57 -57
- package/lib/cjs/PopupToolbar.js.map +1 -1
- package/lib/cjs/SectionDrawingLocationState.d.ts +90 -90
- package/lib/cjs/SectionDrawingLocationState.js +137 -137
- package/lib/cjs/SectionDrawingLocationState.js.map +1 -1
- package/lib/cjs/SectionGraphicsProvider.d.ts +13 -13
- package/lib/cjs/SectionGraphicsProvider.js +273 -273
- package/lib/cjs/SectionGraphicsProvider.js.map +1 -1
- package/lib/cjs/SectionMarkerHandler.d.ts +52 -52
- package/lib/cjs/SectionMarkerHandler.js +112 -112
- package/lib/cjs/SectionMarkerHandler.js.map +1 -1
- package/lib/cjs/SectionMarkers.d.ts +82 -82
- package/lib/cjs/SectionMarkers.js +174 -174
- package/lib/cjs/SectionMarkers.js.map +1 -1
- package/lib/cjs/Tools.d.ts +5 -5
- package/lib/cjs/Tools.js +170 -170
- package/lib/cjs/hypermodeling-frontend.d.ts +13 -13
- package/lib/cjs/hypermodeling-frontend.js +29 -29
- package/lib/cjs/hypermodeling-frontend.js.map +1 -1
- package/lib/esm/HyperModeling.d.ts +114 -114
- package/lib/esm/HyperModeling.js +236 -236
- package/lib/esm/HyperModelingConfig.d.ts +54 -54
- package/lib/esm/HyperModelingConfig.js +8 -8
- package/lib/esm/HyperModelingConfig.js.map +1 -1
- package/lib/esm/HyperModelingDecorator.d.ts +110 -110
- package/lib/esm/HyperModelingDecorator.js +333 -333
- package/lib/esm/HyperModelingDecorator.js.map +1 -1
- package/lib/esm/PopupToolbar.d.ts +24 -24
- package/lib/esm/PopupToolbar.js +53 -53
- package/lib/esm/PopupToolbar.js.map +1 -1
- package/lib/esm/SectionDrawingLocationState.d.ts +90 -90
- package/lib/esm/SectionDrawingLocationState.js +133 -133
- package/lib/esm/SectionDrawingLocationState.js.map +1 -1
- package/lib/esm/SectionGraphicsProvider.d.ts +13 -13
- package/lib/esm/SectionGraphicsProvider.js +269 -269
- package/lib/esm/SectionGraphicsProvider.js.map +1 -1
- package/lib/esm/SectionMarkerHandler.d.ts +52 -52
- package/lib/esm/SectionMarkerHandler.js +108 -108
- package/lib/esm/SectionMarkerHandler.js.map +1 -1
- package/lib/esm/SectionMarkers.d.ts +82 -82
- package/lib/esm/SectionMarkers.js +168 -168
- package/lib/esm/SectionMarkers.js.map +1 -1
- package/lib/esm/Tools.d.ts +5 -5
- package/lib/esm/Tools.js +166 -166
- package/lib/esm/hypermodeling-frontend.d.ts +13 -13
- package/lib/esm/hypermodeling-frontend.js +17 -17
- package/lib/esm/hypermodeling-frontend.js.map +1 -1
- package/lib/public/locales/en/HyperModeling.json +32 -32
- package/package.json +13 -13
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SectionGraphicsProvider.js","sourceRoot":"","sources":["../../src/SectionGraphicsProvider.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAAoF;AACpF,wDAA0F;AAC1F,oDAA0H;AAC1H,wDAI8B;AAE9B,mDAAgD;AAgBhD,MAAM,iBAAiB;IACd,kBAAkB,CAAC,GAAgB,EAAE,GAAgB;QAC1D,IAAI,GAAG,GAAG,IAAA,8BAAe,EAAC,GAAG,CAAC,OAAO,EAAE,GAAG,CAAC,OAAO,CAAC,CAAC;QACpD,IAAI,CAAC,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ACZ,IAAI,CAAC,SAAS,GAAG,IAAI,kBAAkB,CAAC,EAAE,KAAK,EAAE,UAAU,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC;IAClF,CAAC;IAEM,kBAAkB,CAAC,SAAmB,EAAE,IAAsC;QACnF,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;QACvB,IAAI,SAAS,KAAK,IAAI,CAAC,SAAS;YAC9B,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IACzB,CAAC;CACF;AAED;;;;;;GAMG;AACI,KAAK,UAAU,6BAA6B,CAAC,KAAkC;IACpF,IAAI,UAAU,CAAC;IACf,IAAI,SAAS,KAAK,KAAK,CAAC,cAAc,EAAE;QACtC,MAAM,WAAW,GAAG,MAAM,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,EAAE,CAA0B,CAAC;QAC3G,IAAI,CAAC,KAAK,WAAW,CAAC,MAAM;YAC1B,UAAU,GAAG,WAAW,CAAC,CAAC,CAAC,CAAC;KAC/B;IAED,OAAO,IAAI,uBAAuB,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC;AACxD,CAAC;AATD,sEASC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module HyperModeling\r\n */\r\n\r\nimport { assert, compareBooleans, compareStrings, Id64 } from \"@itwin/core-bentley\";\r\nimport { ClipShape, ClipVector, Point3d, Range3d, Transform } from \"@itwin/core-geometry\";\r\nimport { ColorDef, Placement2d, ViewAttachmentProps, ViewDefinition2dProps, ViewFlagOverrides } from \"@itwin/core-common\";\r\nimport {\r\n CategorySelectorState, DisclosedTileTreeSet, DisplayStyle2dState, DrawingViewState,\r\n FeatureSymbology, GeometricModel2dState, GraphicBranch, HitDetail, IModelApp, IModelConnection, RenderClipVolume, RenderSystem, SheetModelState, Tile, TileContent, TiledGraphicsProvider, TileDrawArgs,\r\n TileLoadPriority, TileRequest, TileRequestChannel, TileTree, TileTreeOwner, TileTreeReference, TileTreeSupplier, Viewport, ViewState2d,\r\n} from \"@itwin/core-frontend\";\r\nimport { SectionDrawingLocationState } from \"./SectionDrawingLocationState\";\r\nimport { HyperModeling } from \"./HyperModeling\";\r\n\r\ninterface ProxyTreeId {\r\n state: SectionDrawingLocationState;\r\n isSheet: boolean;\r\n attachment?: ViewAttachmentProps;\r\n}\r\n\r\ninterface ProxyTreeParams {\r\n tree: TileTree;\r\n ref: TileTreeReference;\r\n view: ViewState2d;\r\n state: SectionDrawingLocationState;\r\n attachment?: ViewAttachmentProps;\r\n}\r\n\r\nclass ProxyTreeSupplier implements TileTreeSupplier {\r\n public compareTileTreeIds(lhs: ProxyTreeId, rhs: ProxyTreeId): number {\r\n let cmp = compareBooleans(lhs.isSheet, rhs.isSheet);\r\n if (0 === cmp)\r\n cmp = compareStrings(lhs.state.id, rhs.state.id);\r\n\r\n return cmp;\r\n }\r\n\r\n public async createTileTree(id: ProxyTreeId, iModel: IModelConnection): Promise<TileTree | undefined> {\r\n let view;\r\n if (id.isSheet) {\r\n assert(undefined !== id.attachment);\r\n view = await this.createSheetViewState(id.state, id.attachment);\r\n } else {\r\n view = await id.state.tryLoadDrawingView();\r\n }\r\n\r\n if (undefined === view)\r\n return undefined;\r\n\r\n try {\r\n await iModel.models.load(view.baseModelId);\r\n const model = iModel.models.getLoaded(view.baseModelId);\r\n if (undefined === model || !(model instanceof GeometricModel2dState))\r\n return undefined;\r\n\r\n const treeRef = model.createTileTreeReference(view);\r\n const tree = await treeRef.treeOwner.loadTree();\r\n if (undefined === tree)\r\n return undefined;\r\n\r\n const ctor = id.isSheet ? SheetProxyTree : DrawingProxyTree;\r\n return new ctor({ tree, ref: treeRef, view, state: id.state, attachment: id.attachment });\r\n } catch {\r\n return undefined;\r\n }\r\n }\r\n\r\n private async createSheetViewState(state: SectionDrawingLocationState, attachment: ViewAttachmentProps): Promise<DrawingViewState | undefined> {\r\n assert(undefined !== state.viewAttachment);\r\n try {\r\n // A persistent view of the sheet doesn't necessarily exist, and we don't want a SheetViewState anyway.\r\n // All we want is to draw all the elements in the sheet (sans view attachments) clipped by the drawing boundary.\r\n // However, ModelState.createTileTreeReference() requires a ViewState.\r\n await state.iModel.models.load(attachment.model);\r\n const sheet = state.iModel.models.getLoaded(attachment.model);\r\n if (undefined === sheet || !(sheet instanceof SheetModelState))\r\n return undefined;\r\n\r\n const sheetExtents = await sheet.queryModelRange();\r\n const viewProps: ViewDefinition2dProps = {\r\n baseModelId: attachment.model,\r\n origin: { x: 0, y: 0 },\r\n delta: { x: sheetExtents.high.x, y: sheetExtents.high.y },\r\n angle: 0,\r\n categorySelectorId: Id64.invalid,\r\n displayStyleId: Id64.invalid,\r\n model: Id64.invalid,\r\n code: {\r\n spec: Id64.invalid,\r\n scope: Id64.invalid,\r\n },\r\n classFullName: DrawingViewState.classFullName,\r\n };\r\n\r\n const displayStyle = new DisplayStyle2dState({} as any, state.iModel);\r\n const categorySelector = new CategorySelectorState({} as any, state.iModel);\r\n\r\n return new DrawingViewState(viewProps, state.iModel, categorySelector, displayStyle, sheetExtents);\r\n } catch {\r\n return undefined;\r\n }\r\n }\r\n}\r\n\r\nconst proxyTreeSupplier = new ProxyTreeSupplier();\r\n\r\n/** A proxy for a 2d tile tree to be drawn in the context of a spatial view. */\r\nclass ProxyTreeReference extends TileTreeReference {\r\n private readonly _owner: TileTreeOwner;\r\n\r\n public constructor(id: ProxyTreeId) {\r\n super();\r\n this._owner = id.state.iModel.tiles.getTileTreeOwner(id, proxyTreeSupplier);\r\n }\r\n\r\n public override get castsShadows() {\r\n return false;\r\n }\r\n\r\n public override getClipVolume(tree: TileTree) {\r\n return true !== HyperModeling.graphicsConfig.ignoreClip ? super.getClipVolume(tree) : undefined;\r\n }\r\n\r\n public get treeOwner() { return this._owner; }\r\n\r\n private get _proxiedRef(): TileTreeReference | undefined {\r\n const proxiedTree = this.treeOwner.tileTree as ProxyTree;\r\n return undefined !== proxiedTree ? proxiedTree.ref : undefined;\r\n }\r\n\r\n public override discloseTileTrees(trees: DisclosedTileTreeSet): void {\r\n super.discloseTileTrees(trees);\r\n const ref = this._proxiedRef;\r\n if (undefined !== ref)\r\n ref.discloseTileTrees(trees);\r\n }\r\n\r\n public override async getToolTip(hit: HitDetail) {\r\n const ref = this._proxiedRef;\r\n return undefined !== ref ? ref.getToolTip(hit) : super.getToolTip(hit);\r\n }\r\n}\r\n\r\n/** A proxy for a 2d tile tree to be drawn in the context of a spatial view. */\r\nabstract class ProxyTree extends TileTree {\r\n private readonly _rootTile: ProxyTile;\r\n private readonly _viewFlagOverrides: ViewFlagOverrides;\r\n public readonly tree: TileTree;\r\n public readonly ref: TileTreeReference;\r\n public readonly symbologyOverrides: FeatureSymbology.Overrides;\r\n\r\n protected constructor(params: ProxyTreeParams, location: Transform, clipVolume: RenderClipVolume | undefined) {\r\n const { tree, ref, view } = { ...params };\r\n super({\r\n id: params.state.id,\r\n modelId: tree.modelId,\r\n iModel: tree.iModel,\r\n location,\r\n priority: TileLoadPriority.Primary,\r\n clipVolume,\r\n });\r\n\r\n this.tree = tree;\r\n this.ref = ref;\r\n this.symbologyOverrides = new FeatureSymbology.Overrides(view);\r\n\r\n const range = tree.iModelTransform.multiplyRange(tree.rootTile.range);\r\n const inverse = location.inverse();\r\n if (undefined !== inverse)\r\n inverse.multiplyRange(range, range);\r\n\r\n this._viewFlagOverrides = {\r\n ...view.viewFlags,\r\n lighting: false,\r\n // View clip (section clip) should not apply to 2d graphics.\r\n clipVolume: false,\r\n };\r\n\r\n this._rootTile = new ProxyTile(this, range);\r\n }\r\n\r\n public get rootTile(): ProxyTile { return this._rootTile; }\r\n public get viewFlagOverrides() { return this._viewFlagOverrides; }\r\n public get is3d() { return false; }\r\n public override get isContentUnbounded() { return false; }\r\n public get maxDepth() { return 1; }\r\n\r\n protected abstract get isDisplayed(): boolean;\r\n\r\n public draw(args: TileDrawArgs): void {\r\n if (!this.isDisplayed)\r\n return;\r\n\r\n const tiles = this.selectTiles(args);\r\n for (const tile of tiles)\r\n tile.drawGraphics(args);\r\n\r\n args.drawGraphics();\r\n }\r\n\r\n protected _selectTiles(_args: TileDrawArgs): Tile[] {\r\n return this.isDisplayed ? [this.rootTile] : [];\r\n }\r\n\r\n public prune(): void {\r\n // Our single tile is only a proxy. Our proxied tree(s) will be pruned separately\r\n }\r\n}\r\n\r\nclass DrawingProxyTree extends ProxyTree {\r\n public constructor(params: ProxyTreeParams) {\r\n const { state, attachment } = { ...params };\r\n const location = state.drawingToSpatialTransform.clone();\r\n\r\n let clipVolume;\r\n if (attachment) {\r\n assert(undefined !== state.viewAttachment);\r\n const clipJSON = attachment.jsonProperties?.clip;\r\n const clip = clipJSON ? ClipVector.fromJSON(clipJSON) : ClipVector.createEmpty();\r\n if (!clipJSON) {\r\n const placement = Placement2d.fromJSON(attachment.placement);\r\n const range = placement.calculateRange();\r\n clip.appendShape([\r\n Point3d.create(range.low.x, range.low.y),\r\n Point3d.create(range.high.x, range.low.y),\r\n Point3d.create(range.high.x, range.high.y),\r\n Point3d.create(range.low.x, range.high.y),\r\n ]);\r\n }\r\n\r\n if (clip.isValid) {\r\n const sheetToWorld = state.viewAttachment.transformToSpatial.clone();\r\n clip.transformInPlace(sheetToWorld);\r\n clipVolume = IModelApp.renderSystem.createClipVolume(clip);\r\n }\r\n }\r\n\r\n super(params, location, clipVolume);\r\n }\r\n\r\n protected get isDisplayed() { return true !== HyperModeling.graphicsConfig.hideSectionGraphics; }\r\n}\r\n\r\nclass SheetProxyTree extends ProxyTree {\r\n public constructor(params: ProxyTreeParams) {\r\n const { state, attachment } = { ...params };\r\n assert(undefined !== state.viewAttachment);\r\n assert(undefined !== attachment);\r\n const location = state.viewAttachment.transformToSpatial.clone();\r\n\r\n let clipVolume;\r\n if (state.viewAttachment.clip)\r\n clipVolume = IModelApp.renderSystem.createClipVolume(state.viewAttachment.clip);\r\n\r\n super(params, location, clipVolume);\r\n\r\n // Our view is manufactured. It draws everything regardless of subcategory.\r\n this.symbologyOverrides.ignoreSubCategory = true;\r\n }\r\n\r\n protected get isDisplayed() { return true !== HyperModeling.graphicsConfig.hideSheetAnnotations; }\r\n}\r\n\r\n/** The single Tile belonging to a ProxyTree, serving as a proxy for all of the proxied tree's tiles. */\r\nclass ProxyTile extends Tile {\r\n public constructor(tree: ProxyTree, range: Range3d) {\r\n super({ contentId: \"\", range, maximumSize: 512, isLeaf: true }, tree);\r\n this.setIsReady();\r\n }\r\n\r\n public get hasChildren() { return false; }\r\n public override get hasGraphics() { return true; }\r\n\r\n public get channel(): TileRequestChannel { throw new Error(\"Proxy tile has no content\"); }\r\n public async requestContent(_isCanceled: () => boolean): Promise<TileRequest.Response> { return undefined; }\r\n public async readContent(_data: TileRequest.ResponseData, _system: RenderSystem, _isCanceled?: () => boolean): Promise<TileContent> { return {}; }\r\n protected _loadChildren(_resolve: (children: Tile[]) => void, _reject: (error: Error) => void): void { }\r\n\r\n public override drawGraphics(args: TileDrawArgs) {\r\n const proxyTree = this.tree as ProxyTree;\r\n const sectionTree = proxyTree.tree;\r\n\r\n const location = proxyTree.iModelTransform.multiplyTransformTransform(sectionTree.iModelTransform);\r\n const clipVolume = true === proxyTree.viewFlagOverrides.clipVolume ? proxyTree.clipVolume : undefined;\r\n args = new TileDrawArgs({ context: args.context, location, tree: sectionTree, now: args.now, viewFlagOverrides: proxyTree.viewFlagOverrides, clipVolume, parentsAndChildrenExclusive: args.parentsAndChildrenExclusive, symbologyOverrides: proxyTree.symbologyOverrides });\r\n sectionTree.draw(args);\r\n\r\n const rangeGfx = this.getRangeGraphic(args.context);\r\n if (undefined !== rangeGfx)\r\n args.graphics.add(rangeGfx);\r\n\r\n if (true !== HyperModeling.graphicsConfig.debugClipVolumes || undefined === proxyTree.clipVolume)\r\n return;\r\n\r\n const builder = args.context.createSceneGraphicBuilder();\r\n builder.setSymbology(ColorDef.red, ColorDef.red, 2);\r\n for (const prim of proxyTree.clipVolume.clipVector.clips) {\r\n if (!(prim instanceof ClipShape))\r\n continue;\r\n\r\n const tf = prim.transformFromClip;\r\n const pts = prim.polygon.map((pt) => tf ? tf.multiplyPoint3d(pt) : pt.clone());\r\n builder.addLineString(pts);\r\n }\r\n\r\n const branch = new GraphicBranch();\r\n branch.entries.push(builder.finish());\r\n branch.setViewFlagOverrides({ clipVolume: false });\r\n args.context.outputGraphic(args.context.createGraphicBranch(branch, Transform.createIdentity()));\r\n }\r\n}\r\n\r\n/** Draws the 2d section graphics into the 3d view. */\r\nclass SectionGraphicsProvider implements TiledGraphicsProvider {\r\n private readonly _drawingRef: TileTreeReference;\r\n private readonly _sheetRef?: TileTreeReference;\r\n\r\n public constructor(state: SectionDrawingLocationState, attachment: ViewAttachmentProps | undefined) {\r\n this._drawingRef = new ProxyTreeReference({ state, attachment, isSheet: false });\r\n if (attachment)\r\n this._sheetRef = new ProxyTreeReference({ state, attachment, isSheet: true });\r\n }\r\n\r\n public forEachTileTreeRef(_viewport: Viewport, func: (ref: TileTreeReference) => void): void {\r\n func(this._drawingRef);\r\n if (undefined !== this._sheetRef)\r\n func(this._sheetRef);\r\n }\r\n}\r\n\r\n/** Creates a TiledGraphicsProvider that can be associated with a [Viewport]($frontend) to display 2d section graphics and annotations in the context of a [SpatialViewState]($frontend).\r\n * Typically used indirectly via [[HyperModelingDecorator]].\r\n * @param state The section drawing location specifying which section drawing to display.\r\n * @returns A provider suitable for passing to [Viewport.addTiledGraphicsProvider]($frontend).\r\n * @see [[HyperModelingDecorator.toggleAttachment]] to activate section graphics for a given [[SectionMarker]].\r\n * @public\r\n */\r\nexport async function createSectionGraphicsProvider(state: SectionDrawingLocationState): Promise<TiledGraphicsProvider> {\r\n let attachment;\r\n if (undefined !== state.viewAttachment) {\r\n const attachments = await state.iModel.elements.getProps(state.viewAttachment.id) as ViewAttachmentProps[];\r\n if (1 === attachments.length)\r\n attachment = attachments[0];\r\n }\r\n\r\n return new SectionGraphicsProvider(state, attachment);\r\n}\r\n"]}
|
|
1
|
+
{"version":3,"file":"SectionGraphicsProvider.js","sourceRoot":"","sources":["../../src/SectionGraphicsProvider.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAAoF;AACpF,wDAA0F;AAC1F,oDAA0H;AAC1H,wDAI8B;AAE9B,mDAAgD;AAgBhD,MAAM,iBAAiB;IACd,kBAAkB,CAAC,GAAgB,EAAE,GAAgB;QAC1D,IAAI,GAAG,GAAG,IAAA,8BAAe,EAAC,GAAG,CAAC,OAAO,EAAE,GAAG,CAAC,OAAO,CAAC,CAAC;QACpD,IAAI,CAAC,KAAK,GAAG;YACX,GAAG,GAAG,IAAA,6BAAc,EAAC,GAAG,CAAC,KAAK,CAAC,EAAE,EAAE,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;QAEnD,OAAO,GAAG,CAAC;IACb,CAAC;IAEM,KAAK,CAAC,cAAc,CAAC,EAAe,EAAE,MAAwB;QACnE,IAAI,IAAI,CAAC;QACT,IAAI,EAAE,CAAC,OAAO,EAAE;YACd,IAAA,qBAAM,EAAC,SAAS,KAAK,EAAE,CAAC,UAAU,CAAC,CAAC;YACpC,IAAI,GAAG,MAAM,IAAI,CAAC,oBAAoB,CAAC,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,UAAU,CAAC,CAAC;SACjE;aAAM;YACL,IAAI,GAAG,MAAM,EAAE,CAAC,KAAK,CAAC,kBAAkB,EAAE,CAAC;SAC5C;QAED,IAAI,SAAS,KAAK,IAAI;YACpB,OAAO,SAAS,CAAC;QAEnB,IAAI;YACF,MAAM,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;YAC3C,MAAM,KAAK,GAAG,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;YACxD,IAAI,S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------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module HyperModeling\n */\n\nimport { assert, compareBooleans, compareStrings, Id64 } from \"@itwin/core-bentley\";\nimport { ClipShape, ClipVector, Point3d, Range3d, Transform } from \"@itwin/core-geometry\";\nimport { ColorDef, Placement2d, ViewAttachmentProps, ViewDefinition2dProps, ViewFlagOverrides } from \"@itwin/core-common\";\nimport {\n CategorySelectorState, DisclosedTileTreeSet, DisplayStyle2dState, DrawingViewState,\n FeatureSymbology, GeometricModel2dState, GraphicBranch, HitDetail, IModelApp, IModelConnection, RenderClipVolume, RenderSystem, SheetModelState, Tile, TileContent, TiledGraphicsProvider, TileDrawArgs,\n TileLoadPriority, TileRequest, TileRequestChannel, TileTree, TileTreeOwner, TileTreeReference, TileTreeSupplier, Viewport, ViewState2d,\n} from \"@itwin/core-frontend\";\nimport { SectionDrawingLocationState } from \"./SectionDrawingLocationState\";\nimport { HyperModeling } from \"./HyperModeling\";\n\ninterface ProxyTreeId {\n state: SectionDrawingLocationState;\n isSheet: boolean;\n attachment?: ViewAttachmentProps;\n}\n\ninterface ProxyTreeParams {\n tree: TileTree;\n ref: TileTreeReference;\n view: ViewState2d;\n state: SectionDrawingLocationState;\n attachment?: ViewAttachmentProps;\n}\n\nclass ProxyTreeSupplier implements TileTreeSupplier {\n public compareTileTreeIds(lhs: ProxyTreeId, rhs: ProxyTreeId): number {\n let cmp = compareBooleans(lhs.isSheet, rhs.isSheet);\n if (0 === cmp)\n cmp = compareStrings(lhs.state.id, rhs.state.id);\n\n return cmp;\n }\n\n public async createTileTree(id: ProxyTreeId, iModel: IModelConnection): Promise<TileTree | undefined> {\n let view;\n if (id.isSheet) {\n assert(undefined !== id.attachment);\n view = await this.createSheetViewState(id.state, id.attachment);\n } else {\n view = await id.state.tryLoadDrawingView();\n }\n\n if (undefined === view)\n return undefined;\n\n try {\n await iModel.models.load(view.baseModelId);\n const model = iModel.models.getLoaded(view.baseModelId);\n if (undefined === model || !(model instanceof GeometricModel2dState))\n return undefined;\n\n const treeRef = model.createTileTreeReference(view);\n const tree = await treeRef.treeOwner.loadTree();\n if (undefined === tree)\n return undefined;\n\n const ctor = id.isSheet ? SheetProxyTree : DrawingProxyTree;\n return new ctor({ tree, ref: treeRef, view, state: id.state, attachment: id.attachment });\n } catch {\n return undefined;\n }\n }\n\n private async createSheetViewState(state: SectionDrawingLocationState, attachment: ViewAttachmentProps): Promise<DrawingViewState | undefined> {\n assert(undefined !== state.viewAttachment);\n try {\n // A persistent view of the sheet doesn't necessarily exist, and we don't want a SheetViewState anyway.\n // All we want is to draw all the elements in the sheet (sans view attachments) clipped by the drawing boundary.\n // However, ModelState.createTileTreeReference() requires a ViewState.\n await state.iModel.models.load(attachment.model);\n const sheet = state.iModel.models.getLoaded(attachment.model);\n if (undefined === sheet || !(sheet instanceof SheetModelState))\n return undefined;\n\n const sheetExtents = await sheet.queryModelRange();\n const viewProps: ViewDefinition2dProps = {\n baseModelId: attachment.model,\n origin: { x: 0, y: 0 },\n delta: { x: sheetExtents.high.x, y: sheetExtents.high.y },\n angle: 0,\n categorySelectorId: Id64.invalid,\n displayStyleId: Id64.invalid,\n model: Id64.invalid,\n code: {\n spec: Id64.invalid,\n scope: Id64.invalid,\n },\n classFullName: DrawingViewState.classFullName,\n };\n\n const displayStyle = new DisplayStyle2dState({} as any, state.iModel);\n const categorySelector = new CategorySelectorState({} as any, state.iModel);\n\n return new DrawingViewState(viewProps, state.iModel, categorySelector, displayStyle, sheetExtents);\n } catch {\n return undefined;\n }\n }\n}\n\nconst proxyTreeSupplier = new ProxyTreeSupplier();\n\n/** A proxy for a 2d tile tree to be drawn in the context of a spatial view. */\nclass ProxyTreeReference extends TileTreeReference {\n private readonly _owner: TileTreeOwner;\n\n public constructor(id: ProxyTreeId) {\n super();\n this._owner = id.state.iModel.tiles.getTileTreeOwner(id, proxyTreeSupplier);\n }\n\n public override get castsShadows() {\n return false;\n }\n\n public override getClipVolume(tree: TileTree) {\n return true !== HyperModeling.graphicsConfig.ignoreClip ? super.getClipVolume(tree) : undefined;\n }\n\n public get treeOwner() { return this._owner; }\n\n private get _proxiedRef(): TileTreeReference | undefined {\n const proxiedTree = this.treeOwner.tileTree as ProxyTree;\n return undefined !== proxiedTree ? proxiedTree.ref : undefined;\n }\n\n public override discloseTileTrees(trees: DisclosedTileTreeSet): void {\n super.discloseTileTrees(trees);\n const ref = this._proxiedRef;\n if (undefined !== ref)\n ref.discloseTileTrees(trees);\n }\n\n public override async getToolTip(hit: HitDetail) {\n const ref = this._proxiedRef;\n return undefined !== ref ? ref.getToolTip(hit) : super.getToolTip(hit);\n }\n}\n\n/** A proxy for a 2d tile tree to be drawn in the context of a spatial view. */\nabstract class ProxyTree extends TileTree {\n private readonly _rootTile: ProxyTile;\n private readonly _viewFlagOverrides: ViewFlagOverrides;\n public readonly tree: TileTree;\n public readonly ref: TileTreeReference;\n public readonly symbologyOverrides: FeatureSymbology.Overrides;\n\n protected constructor(params: ProxyTreeParams, location: Transform, clipVolume: RenderClipVolume | undefined) {\n const { tree, ref, view } = { ...params };\n super({\n id: params.state.id,\n modelId: tree.modelId,\n iModel: tree.iModel,\n location,\n priority: TileLoadPriority.Primary,\n clipVolume,\n });\n\n this.tree = tree;\n this.ref = ref;\n this.symbologyOverrides = new FeatureSymbology.Overrides(view);\n\n const range = tree.iModelTransform.multiplyRange(tree.rootTile.range);\n const inverse = location.inverse();\n if (undefined !== inverse)\n inverse.multiplyRange(range, range);\n\n this._viewFlagOverrides = {\n ...view.viewFlags,\n lighting: false,\n // View clip (section clip) should not apply to 2d graphics.\n clipVolume: false,\n };\n\n this._rootTile = new ProxyTile(this, range);\n }\n\n public get rootTile(): ProxyTile { return this._rootTile; }\n public get viewFlagOverrides() { return this._viewFlagOverrides; }\n public get is3d() { return false; }\n public override get isContentUnbounded() { return false; }\n public get maxDepth() { return 1; }\n\n protected abstract get isDisplayed(): boolean;\n\n public draw(args: TileDrawArgs): void {\n if (!this.isDisplayed)\n return;\n\n const tiles = this.selectTiles(args);\n for (const tile of tiles)\n tile.drawGraphics(args);\n\n args.drawGraphics();\n }\n\n protected _selectTiles(_args: TileDrawArgs): Tile[] {\n return this.isDisplayed ? [this.rootTile] : [];\n }\n\n public prune(): void {\n // Our single tile is only a proxy. Our proxied tree(s) will be pruned separately\n }\n}\n\nclass DrawingProxyTree extends ProxyTree {\n public constructor(params: ProxyTreeParams) {\n const { state, attachment } = { ...params };\n const location = state.drawingToSpatialTransform.clone();\n\n let clipVolume;\n if (attachment) {\n assert(undefined !== state.viewAttachment);\n const clipJSON = attachment.jsonProperties?.clip;\n const clip = clipJSON ? ClipVector.fromJSON(clipJSON) : ClipVector.createEmpty();\n if (!clipJSON) {\n const placement = Placement2d.fromJSON(attachment.placement);\n const range = placement.calculateRange();\n clip.appendShape([\n Point3d.create(range.low.x, range.low.y),\n Point3d.create(range.high.x, range.low.y),\n Point3d.create(range.high.x, range.high.y),\n Point3d.create(range.low.x, range.high.y),\n ]);\n }\n\n if (clip.isValid) {\n const sheetToWorld = state.viewAttachment.transformToSpatial.clone();\n clip.transformInPlace(sheetToWorld);\n clipVolume = IModelApp.renderSystem.createClipVolume(clip);\n }\n }\n\n super(params, location, clipVolume);\n }\n\n protected get isDisplayed() { return true !== HyperModeling.graphicsConfig.hideSectionGraphics; }\n}\n\nclass SheetProxyTree extends ProxyTree {\n public constructor(params: ProxyTreeParams) {\n const { state, attachment } = { ...params };\n assert(undefined !== state.viewAttachment);\n assert(undefined !== attachment);\n const location = state.viewAttachment.transformToSpatial.clone();\n\n let clipVolume;\n if (state.viewAttachment.clip)\n clipVolume = IModelApp.renderSystem.createClipVolume(state.viewAttachment.clip);\n\n super(params, location, clipVolume);\n\n // Our view is manufactured. It draws everything regardless of subcategory.\n this.symbologyOverrides.ignoreSubCategory = true;\n }\n\n protected get isDisplayed() { return true !== HyperModeling.graphicsConfig.hideSheetAnnotations; }\n}\n\n/** The single Tile belonging to a ProxyTree, serving as a proxy for all of the proxied tree's tiles. */\nclass ProxyTile extends Tile {\n public constructor(tree: ProxyTree, range: Range3d) {\n super({ contentId: \"\", range, maximumSize: 512, isLeaf: true }, tree);\n this.setIsReady();\n }\n\n public get hasChildren() { return false; }\n public override get hasGraphics() { return true; }\n\n public get channel(): TileRequestChannel { throw new Error(\"Proxy tile has no content\"); }\n public async requestContent(_isCanceled: () => boolean): Promise<TileRequest.Response> { return undefined; }\n public async readContent(_data: TileRequest.ResponseData, _system: RenderSystem, _isCanceled?: () => boolean): Promise<TileContent> { return {}; }\n protected _loadChildren(_resolve: (children: Tile[]) => void, _reject: (error: Error) => void): void { }\n\n public override drawGraphics(args: TileDrawArgs) {\n const proxyTree = this.tree as ProxyTree;\n const sectionTree = proxyTree.tree;\n\n const location = proxyTree.iModelTransform.multiplyTransformTransform(sectionTree.iModelTransform);\n const clipVolume = true === proxyTree.viewFlagOverrides.clipVolume ? proxyTree.clipVolume : undefined;\n args = new TileDrawArgs({ context: args.context, location, tree: sectionTree, now: args.now, viewFlagOverrides: proxyTree.viewFlagOverrides, clipVolume, parentsAndChildrenExclusive: args.parentsAndChildrenExclusive, symbologyOverrides: proxyTree.symbologyOverrides });\n sectionTree.draw(args);\n\n const rangeGfx = this.getRangeGraphic(args.context);\n if (undefined !== rangeGfx)\n args.graphics.add(rangeGfx);\n\n if (true !== HyperModeling.graphicsConfig.debugClipVolumes || undefined === proxyTree.clipVolume)\n return;\n\n const builder = args.context.createSceneGraphicBuilder();\n builder.setSymbology(ColorDef.red, ColorDef.red, 2);\n for (const prim of proxyTree.clipVolume.clipVector.clips) {\n if (!(prim instanceof ClipShape))\n continue;\n\n const tf = prim.transformFromClip;\n const pts = prim.polygon.map((pt) => tf ? tf.multiplyPoint3d(pt) : pt.clone());\n builder.addLineString(pts);\n }\n\n const branch = new GraphicBranch();\n branch.entries.push(builder.finish());\n branch.setViewFlagOverrides({ clipVolume: false });\n args.context.outputGraphic(args.context.createGraphicBranch(branch, Transform.createIdentity()));\n }\n}\n\n/** Draws the 2d section graphics into the 3d view. */\nclass SectionGraphicsProvider implements TiledGraphicsProvider {\n private readonly _drawingRef: TileTreeReference;\n private readonly _sheetRef?: TileTreeReference;\n\n public constructor(state: SectionDrawingLocationState, attachment: ViewAttachmentProps | undefined) {\n this._drawingRef = new ProxyTreeReference({ state, attachment, isSheet: false });\n if (attachment)\n this._sheetRef = new ProxyTreeReference({ state, attachment, isSheet: true });\n }\n\n public forEachTileTreeRef(_viewport: Viewport, func: (ref: TileTreeReference) => void): void {\n func(this._drawingRef);\n if (undefined !== this._sheetRef)\n func(this._sheetRef);\n }\n}\n\n/** Creates a TiledGraphicsProvider that can be associated with a [Viewport]($frontend) to display 2d section graphics and annotations in the context of a [SpatialViewState]($frontend).\n * Typically used indirectly via [[HyperModelingDecorator]].\n * @param state The section drawing location specifying which section drawing to display.\n * @returns A provider suitable for passing to [Viewport.addTiledGraphicsProvider]($frontend).\n * @see [[HyperModelingDecorator.toggleAttachment]] to activate section graphics for a given [[SectionMarker]].\n * @public\n */\nexport async function createSectionGraphicsProvider(state: SectionDrawingLocationState): Promise<TiledGraphicsProvider> {\n let attachment;\n if (undefined !== state.viewAttachment) {\n const attachments = await state.iModel.elements.getProps(state.viewAttachment.id) as ViewAttachmentProps[];\n if (1 === attachments.length)\n attachment = attachments[0];\n }\n\n return new SectionGraphicsProvider(state, attachment);\n}\n"]}
|
|
@@ -1,53 +1,53 @@
|
|
|
1
|
-
/** @packageDocumentation
|
|
2
|
-
* @module HyperModeling
|
|
3
|
-
*/
|
|
4
|
-
import type { AbstractToolbarProps } from "@itwin/appui-abstract";
|
|
5
|
-
import { SectionMarker } from "./SectionMarkers";
|
|
6
|
-
import { SectionMarkerConfig } from "./HyperModelingConfig";
|
|
7
|
-
import { HyperModelingDecorator } from "./HyperModelingDecorator";
|
|
8
|
-
/** Supplies interactions with [[SectionMarker]]s, including a mini-toolbar displayed when the mouse hovers over a marker and what action occurs when the user clicks a marker.
|
|
9
|
-
* The base implementation supplies the following interactions:
|
|
10
|
-
* * Click: Toggle display of the section graphics and clip volume; apply the section's spatial view if toggling on.
|
|
11
|
-
* * Toolbar:
|
|
12
|
-
* * Apply Section: Applies the section location's spatial view to the viewport and displays the 2d section graphics.
|
|
13
|
-
* * Open Drawing: Navigates to the section drawing view. By default, this applies the section drawing view to the viewport.
|
|
14
|
-
* * Open Sheet: Navigates to the [ViewAttachment]($backend) of the section drawing on a [Sheet]($backend). Disabled if no such attachment exists.
|
|
15
|
-
* @see [[HyperModelingConfig]] to override the default handler by supplying a subclass of `SectionMarkerHandler`.
|
|
16
|
-
* @see [[HyperModelingDecorator]] for various methods that might be usefully wired up to marker click or toolbar actions.
|
|
17
|
-
* @public
|
|
18
|
-
*/
|
|
19
|
-
export declare class SectionMarkerHandler {
|
|
20
|
-
/** Respond to activation of the specified marker. Return true if the marker should become the active marker - i.e., if the marker was successfully activated.
|
|
21
|
-
* @see [[SectionMarkerHandler.deactivateMarker]].
|
|
22
|
-
*/
|
|
23
|
-
activateMarker(marker: SectionMarker, decorator: HyperModelingDecorator): Promise<boolean>;
|
|
24
|
-
/** Respond to deactivation of the specified marker. Invoked when the user clicks on the marker while it is the active marker.
|
|
25
|
-
* This should perform the inverse of [[SectionMarkerHandler.activateMarker]]. The marker becomes inactive as a result.
|
|
26
|
-
*/
|
|
27
|
-
deactivateMarker(marker: SectionMarker, decorator: HyperModelingDecorator): Promise<void>;
|
|
28
|
-
/** Return toolbar items for the specified marker. If the array of toolbar items is empty, no toolbar will be displayed.
|
|
29
|
-
* @see [[executeCommand]] to implement each toolbar command.
|
|
30
|
-
*/
|
|
31
|
-
getToolbarProps(marker: SectionMarker, _decorator: HyperModelingDecorator): AbstractToolbarProps;
|
|
32
|
-
/** Execute the command associated with the specified tool bar item.
|
|
33
|
-
* @see [[getToolbarProps]] to define the set of commands.
|
|
34
|
-
*/
|
|
35
|
-
executeCommand(commandId: string, marker: SectionMarker, decorator: HyperModelingDecorator): Promise<void>;
|
|
36
|
-
/** Customize which markers are visible. [[HyperModelingDecorator]] determines marker visibility as follows:
|
|
37
|
-
* - If a marker is currently active (selected), only that marker is visible.
|
|
38
|
-
* - Otherwise, the marker is visible if this method returns `true`.
|
|
39
|
-
* The default implementation of this method determines visibility based on the [[SectionMarkerConfig]] as follows.
|
|
40
|
-
* - If the marker is of a type included in the config's `hiddenSectionTypes`, it is invisible.
|
|
41
|
-
* - If the marker belongs to a model not currently displayed in the viewport and the config's `ignoreModelSelector` is false, it is invisible.
|
|
42
|
-
* - If the marker belongs to a category not currently displayed in the viewport and the config's `ignoreCategorySelector` is false, it is invisible,
|
|
43
|
-
* - Otherwise, the marker is visible, unless this method returns `false`.
|
|
44
|
-
* The default implementation of this method always returns `true`
|
|
45
|
-
* @param marker The marker whose visibility is to be determined.
|
|
46
|
-
* @param decorator The hypermodeling decorator to which the marker belongs.
|
|
47
|
-
* @param config The configuration controlling marker visibility based on [SectionType]($common), [ModelSelectorState]($frontend), and [CategorySelectorState]($frontend).
|
|
48
|
-
* @returns true if the marker should be displayed; false to make it invisible.
|
|
49
|
-
* @see [[HyperModelingDecorator.requestSync]] to force the decorator to reevaluate marker visibility when the criterion used by your implementation of this method changes.
|
|
50
|
-
*/
|
|
51
|
-
isMarkerVisible(marker: SectionMarker, decorator: HyperModelingDecorator, config: SectionMarkerConfig): boolean;
|
|
52
|
-
}
|
|
1
|
+
/** @packageDocumentation
|
|
2
|
+
* @module HyperModeling
|
|
3
|
+
*/
|
|
4
|
+
import type { AbstractToolbarProps } from "@itwin/appui-abstract";
|
|
5
|
+
import { SectionMarker } from "./SectionMarkers";
|
|
6
|
+
import { SectionMarkerConfig } from "./HyperModelingConfig";
|
|
7
|
+
import { HyperModelingDecorator } from "./HyperModelingDecorator";
|
|
8
|
+
/** Supplies interactions with [[SectionMarker]]s, including a mini-toolbar displayed when the mouse hovers over a marker and what action occurs when the user clicks a marker.
|
|
9
|
+
* The base implementation supplies the following interactions:
|
|
10
|
+
* * Click: Toggle display of the section graphics and clip volume; apply the section's spatial view if toggling on.
|
|
11
|
+
* * Toolbar:
|
|
12
|
+
* * Apply Section: Applies the section location's spatial view to the viewport and displays the 2d section graphics.
|
|
13
|
+
* * Open Drawing: Navigates to the section drawing view. By default, this applies the section drawing view to the viewport.
|
|
14
|
+
* * Open Sheet: Navigates to the [ViewAttachment]($backend) of the section drawing on a [Sheet]($backend). Disabled if no such attachment exists.
|
|
15
|
+
* @see [[HyperModelingConfig]] to override the default handler by supplying a subclass of `SectionMarkerHandler`.
|
|
16
|
+
* @see [[HyperModelingDecorator]] for various methods that might be usefully wired up to marker click or toolbar actions.
|
|
17
|
+
* @public
|
|
18
|
+
*/
|
|
19
|
+
export declare class SectionMarkerHandler {
|
|
20
|
+
/** Respond to activation of the specified marker. Return true if the marker should become the active marker - i.e., if the marker was successfully activated.
|
|
21
|
+
* @see [[SectionMarkerHandler.deactivateMarker]].
|
|
22
|
+
*/
|
|
23
|
+
activateMarker(marker: SectionMarker, decorator: HyperModelingDecorator): Promise<boolean>;
|
|
24
|
+
/** Respond to deactivation of the specified marker. Invoked when the user clicks on the marker while it is the active marker.
|
|
25
|
+
* This should perform the inverse of [[SectionMarkerHandler.activateMarker]]. The marker becomes inactive as a result.
|
|
26
|
+
*/
|
|
27
|
+
deactivateMarker(marker: SectionMarker, decorator: HyperModelingDecorator): Promise<void>;
|
|
28
|
+
/** Return toolbar items for the specified marker. If the array of toolbar items is empty, no toolbar will be displayed.
|
|
29
|
+
* @see [[executeCommand]] to implement each toolbar command.
|
|
30
|
+
*/
|
|
31
|
+
getToolbarProps(marker: SectionMarker, _decorator: HyperModelingDecorator): AbstractToolbarProps;
|
|
32
|
+
/** Execute the command associated with the specified tool bar item.
|
|
33
|
+
* @see [[getToolbarProps]] to define the set of commands.
|
|
34
|
+
*/
|
|
35
|
+
executeCommand(commandId: string, marker: SectionMarker, decorator: HyperModelingDecorator): Promise<void>;
|
|
36
|
+
/** Customize which markers are visible. [[HyperModelingDecorator]] determines marker visibility as follows:
|
|
37
|
+
* - If a marker is currently active (selected), only that marker is visible.
|
|
38
|
+
* - Otherwise, the marker is visible if this method returns `true`.
|
|
39
|
+
* The default implementation of this method determines visibility based on the [[SectionMarkerConfig]] as follows.
|
|
40
|
+
* - If the marker is of a type included in the config's `hiddenSectionTypes`, it is invisible.
|
|
41
|
+
* - If the marker belongs to a model not currently displayed in the viewport and the config's `ignoreModelSelector` is false, it is invisible.
|
|
42
|
+
* - If the marker belongs to a category not currently displayed in the viewport and the config's `ignoreCategorySelector` is false, it is invisible,
|
|
43
|
+
* - Otherwise, the marker is visible, unless this method returns `false`.
|
|
44
|
+
* The default implementation of this method always returns `true`
|
|
45
|
+
* @param marker The marker whose visibility is to be determined.
|
|
46
|
+
* @param decorator The hypermodeling decorator to which the marker belongs.
|
|
47
|
+
* @param config The configuration controlling marker visibility based on [SectionType]($common), [ModelSelectorState]($frontend), and [CategorySelectorState]($frontend).
|
|
48
|
+
* @returns true if the marker should be displayed; false to make it invisible.
|
|
49
|
+
* @see [[HyperModelingDecorator.requestSync]] to force the decorator to reevaluate marker visibility when the criterion used by your implementation of this method changes.
|
|
50
|
+
*/
|
|
51
|
+
isMarkerVisible(marker: SectionMarker, decorator: HyperModelingDecorator, config: SectionMarkerConfig): boolean;
|
|
52
|
+
}
|
|
53
53
|
//# sourceMappingURL=SectionMarkerHandler.d.ts.map
|
|
@@ -1,113 +1,113 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/*---------------------------------------------------------------------------------------------
|
|
3
|
-
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
4
|
-
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
5
|
-
*--------------------------------------------------------------------------------------------*/
|
|
6
|
-
/** @packageDocumentation
|
|
7
|
-
* @module HyperModeling
|
|
8
|
-
*/
|
|
9
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
exports.SectionMarkerHandler = void 0;
|
|
11
|
-
const core_frontend_1 = require("@itwin/core-frontend");
|
|
12
|
-
/** Supplies interactions with [[SectionMarker]]s, including a mini-toolbar displayed when the mouse hovers over a marker and what action occurs when the user clicks a marker.
|
|
13
|
-
* The base implementation supplies the following interactions:
|
|
14
|
-
* * Click: Toggle display of the section graphics and clip volume; apply the section's spatial view if toggling on.
|
|
15
|
-
* * Toolbar:
|
|
16
|
-
* * Apply Section: Applies the section location's spatial view to the viewport and displays the 2d section graphics.
|
|
17
|
-
* * Open Drawing: Navigates to the section drawing view. By default, this applies the section drawing view to the viewport.
|
|
18
|
-
* * Open Sheet: Navigates to the [ViewAttachment]($backend) of the section drawing on a [Sheet]($backend). Disabled if no such attachment exists.
|
|
19
|
-
* @see [[HyperModelingConfig]] to override the default handler by supplying a subclass of `SectionMarkerHandler`.
|
|
20
|
-
* @see [[HyperModelingDecorator]] for various methods that might be usefully wired up to marker click or toolbar actions.
|
|
21
|
-
* @public
|
|
22
|
-
*/
|
|
23
|
-
class SectionMarkerHandler {
|
|
24
|
-
/** Respond to activation of the specified marker. Return true if the marker should become the active marker - i.e., if the marker was successfully activated.
|
|
25
|
-
* @see [[SectionMarkerHandler.deactivateMarker]].
|
|
26
|
-
*/
|
|
27
|
-
async activateMarker(marker, decorator) {
|
|
28
|
-
return decorator.toggleSection(marker, true);
|
|
29
|
-
}
|
|
30
|
-
/** Respond to deactivation of the specified marker. Invoked when the user clicks on the marker while it is the active marker.
|
|
31
|
-
* This should perform the inverse of [[SectionMarkerHandler.activateMarker]]. The marker becomes inactive as a result.
|
|
32
|
-
*/
|
|
33
|
-
async deactivateMarker(marker, decorator) {
|
|
34
|
-
await decorator.toggleSection(marker, false);
|
|
35
|
-
}
|
|
36
|
-
/** Return toolbar items for the specified marker. If the array of toolbar items is empty, no toolbar will be displayed.
|
|
37
|
-
* @see [[executeCommand]] to implement each toolbar command.
|
|
38
|
-
*/
|
|
39
|
-
getToolbarProps(marker, _decorator) {
|
|
40
|
-
var _a;
|
|
41
|
-
const localization = core_frontend_1.IModelApp.localization;
|
|
42
|
-
return {
|
|
43
|
-
items: [
|
|
44
|
-
{
|
|
45
|
-
id: "apply_view",
|
|
46
|
-
itemPriority: 10,
|
|
47
|
-
label: localization.getLocalizedString("HyperModeling:Message.ApplyView"),
|
|
48
|
-
icon: "icon-spatial-view-apply",
|
|
49
|
-
execute: () => { },
|
|
50
|
-
isDisabled: false,
|
|
51
|
-
},
|
|
52
|
-
{
|
|
53
|
-
id: "open_section",
|
|
54
|
-
itemPriority: 20,
|
|
55
|
-
label: localization.getLocalizedString("HyperModeling:Message.OpenSection"),
|
|
56
|
-
icon: "icon-plan-drawing",
|
|
57
|
-
execute: () => { },
|
|
58
|
-
isDisabled: false,
|
|
59
|
-
},
|
|
60
|
-
{
|
|
61
|
-
id: "open_sheet",
|
|
62
|
-
itemPriority: 30,
|
|
63
|
-
label: localization.getLocalizedString("HyperModeling:Message.OpenSheet"),
|
|
64
|
-
icon: "icon-plan-floor",
|
|
65
|
-
execute: () => { },
|
|
66
|
-
isDisabled: undefined === ((_a = marker.state.viewAttachment) === null || _a === void 0 ? void 0 : _a.viewId),
|
|
67
|
-
},
|
|
68
|
-
],
|
|
69
|
-
};
|
|
70
|
-
}
|
|
71
|
-
/** Execute the command associated with the specified tool bar item.
|
|
72
|
-
* @see [[getToolbarProps]] to define the set of commands.
|
|
73
|
-
*/
|
|
74
|
-
async executeCommand(commandId, marker, decorator) {
|
|
75
|
-
switch (commandId) {
|
|
76
|
-
case "apply_view":
|
|
77
|
-
await decorator.applySpatialView(marker);
|
|
78
|
-
break;
|
|
79
|
-
case "open_section":
|
|
80
|
-
await decorator.openSection(marker);
|
|
81
|
-
break;
|
|
82
|
-
case "open_sheet":
|
|
83
|
-
await decorator.openSheet(marker);
|
|
84
|
-
break;
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
/** Customize which markers are visible. [[HyperModelingDecorator]] determines marker visibility as follows:
|
|
88
|
-
* - If a marker is currently active (selected), only that marker is visible.
|
|
89
|
-
* - Otherwise, the marker is visible if this method returns `true`.
|
|
90
|
-
* The default implementation of this method determines visibility based on the [[SectionMarkerConfig]] as follows.
|
|
91
|
-
* - If the marker is of a type included in the config's `hiddenSectionTypes`, it is invisible.
|
|
92
|
-
* - If the marker belongs to a model not currently displayed in the viewport and the config's `ignoreModelSelector` is false, it is invisible.
|
|
93
|
-
* - If the marker belongs to a category not currently displayed in the viewport and the config's `ignoreCategorySelector` is false, it is invisible,
|
|
94
|
-
* - Otherwise, the marker is visible, unless this method returns `false`.
|
|
95
|
-
* The default implementation of this method always returns `true`
|
|
96
|
-
* @param marker The marker whose visibility is to be determined.
|
|
97
|
-
* @param decorator The hypermodeling decorator to which the marker belongs.
|
|
98
|
-
* @param config The configuration controlling marker visibility based on [SectionType]($common), [ModelSelectorState]($frontend), and [CategorySelectorState]($frontend).
|
|
99
|
-
* @returns true if the marker should be displayed; false to make it invisible.
|
|
100
|
-
* @see [[HyperModelingDecorator.requestSync]] to force the decorator to reevaluate marker visibility when the criterion used by your implementation of this method changes.
|
|
101
|
-
*/
|
|
102
|
-
isMarkerVisible(marker, decorator, config) {
|
|
103
|
-
if (undefined !== config.hiddenSectionTypes && config.hiddenSectionTypes.includes(marker.state.sectionType))
|
|
104
|
-
return false;
|
|
105
|
-
if (!config.ignoreCategorySelector && !decorator.viewport.view.viewsCategory(marker.state.category))
|
|
106
|
-
return false;
|
|
107
|
-
if (!config.ignoreModelSelector && !decorator.viewport.view.viewsModel(marker.state.model))
|
|
108
|
-
return false;
|
|
109
|
-
return true;
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
exports.SectionMarkerHandler = SectionMarkerHandler;
|
|
1
|
+
"use strict";
|
|
2
|
+
/*---------------------------------------------------------------------------------------------
|
|
3
|
+
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
4
|
+
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
5
|
+
*--------------------------------------------------------------------------------------------*/
|
|
6
|
+
/** @packageDocumentation
|
|
7
|
+
* @module HyperModeling
|
|
8
|
+
*/
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.SectionMarkerHandler = void 0;
|
|
11
|
+
const core_frontend_1 = require("@itwin/core-frontend");
|
|
12
|
+
/** Supplies interactions with [[SectionMarker]]s, including a mini-toolbar displayed when the mouse hovers over a marker and what action occurs when the user clicks a marker.
|
|
13
|
+
* The base implementation supplies the following interactions:
|
|
14
|
+
* * Click: Toggle display of the section graphics and clip volume; apply the section's spatial view if toggling on.
|
|
15
|
+
* * Toolbar:
|
|
16
|
+
* * Apply Section: Applies the section location's spatial view to the viewport and displays the 2d section graphics.
|
|
17
|
+
* * Open Drawing: Navigates to the section drawing view. By default, this applies the section drawing view to the viewport.
|
|
18
|
+
* * Open Sheet: Navigates to the [ViewAttachment]($backend) of the section drawing on a [Sheet]($backend). Disabled if no such attachment exists.
|
|
19
|
+
* @see [[HyperModelingConfig]] to override the default handler by supplying a subclass of `SectionMarkerHandler`.
|
|
20
|
+
* @see [[HyperModelingDecorator]] for various methods that might be usefully wired up to marker click or toolbar actions.
|
|
21
|
+
* @public
|
|
22
|
+
*/
|
|
23
|
+
class SectionMarkerHandler {
|
|
24
|
+
/** Respond to activation of the specified marker. Return true if the marker should become the active marker - i.e., if the marker was successfully activated.
|
|
25
|
+
* @see [[SectionMarkerHandler.deactivateMarker]].
|
|
26
|
+
*/
|
|
27
|
+
async activateMarker(marker, decorator) {
|
|
28
|
+
return decorator.toggleSection(marker, true);
|
|
29
|
+
}
|
|
30
|
+
/** Respond to deactivation of the specified marker. Invoked when the user clicks on the marker while it is the active marker.
|
|
31
|
+
* This should perform the inverse of [[SectionMarkerHandler.activateMarker]]. The marker becomes inactive as a result.
|
|
32
|
+
*/
|
|
33
|
+
async deactivateMarker(marker, decorator) {
|
|
34
|
+
await decorator.toggleSection(marker, false);
|
|
35
|
+
}
|
|
36
|
+
/** Return toolbar items for the specified marker. If the array of toolbar items is empty, no toolbar will be displayed.
|
|
37
|
+
* @see [[executeCommand]] to implement each toolbar command.
|
|
38
|
+
*/
|
|
39
|
+
getToolbarProps(marker, _decorator) {
|
|
40
|
+
var _a;
|
|
41
|
+
const localization = core_frontend_1.IModelApp.localization;
|
|
42
|
+
return {
|
|
43
|
+
items: [
|
|
44
|
+
{
|
|
45
|
+
id: "apply_view",
|
|
46
|
+
itemPriority: 10,
|
|
47
|
+
label: localization.getLocalizedString("HyperModeling:Message.ApplyView"),
|
|
48
|
+
icon: "icon-spatial-view-apply",
|
|
49
|
+
execute: () => { },
|
|
50
|
+
isDisabled: false,
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
id: "open_section",
|
|
54
|
+
itemPriority: 20,
|
|
55
|
+
label: localization.getLocalizedString("HyperModeling:Message.OpenSection"),
|
|
56
|
+
icon: "icon-plan-drawing",
|
|
57
|
+
execute: () => { },
|
|
58
|
+
isDisabled: false,
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
id: "open_sheet",
|
|
62
|
+
itemPriority: 30,
|
|
63
|
+
label: localization.getLocalizedString("HyperModeling:Message.OpenSheet"),
|
|
64
|
+
icon: "icon-plan-floor",
|
|
65
|
+
execute: () => { },
|
|
66
|
+
isDisabled: undefined === ((_a = marker.state.viewAttachment) === null || _a === void 0 ? void 0 : _a.viewId),
|
|
67
|
+
},
|
|
68
|
+
],
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
/** Execute the command associated with the specified tool bar item.
|
|
72
|
+
* @see [[getToolbarProps]] to define the set of commands.
|
|
73
|
+
*/
|
|
74
|
+
async executeCommand(commandId, marker, decorator) {
|
|
75
|
+
switch (commandId) {
|
|
76
|
+
case "apply_view":
|
|
77
|
+
await decorator.applySpatialView(marker);
|
|
78
|
+
break;
|
|
79
|
+
case "open_section":
|
|
80
|
+
await decorator.openSection(marker);
|
|
81
|
+
break;
|
|
82
|
+
case "open_sheet":
|
|
83
|
+
await decorator.openSheet(marker);
|
|
84
|
+
break;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
/** Customize which markers are visible. [[HyperModelingDecorator]] determines marker visibility as follows:
|
|
88
|
+
* - If a marker is currently active (selected), only that marker is visible.
|
|
89
|
+
* - Otherwise, the marker is visible if this method returns `true`.
|
|
90
|
+
* The default implementation of this method determines visibility based on the [[SectionMarkerConfig]] as follows.
|
|
91
|
+
* - If the marker is of a type included in the config's `hiddenSectionTypes`, it is invisible.
|
|
92
|
+
* - If the marker belongs to a model not currently displayed in the viewport and the config's `ignoreModelSelector` is false, it is invisible.
|
|
93
|
+
* - If the marker belongs to a category not currently displayed in the viewport and the config's `ignoreCategorySelector` is false, it is invisible,
|
|
94
|
+
* - Otherwise, the marker is visible, unless this method returns `false`.
|
|
95
|
+
* The default implementation of this method always returns `true`
|
|
96
|
+
* @param marker The marker whose visibility is to be determined.
|
|
97
|
+
* @param decorator The hypermodeling decorator to which the marker belongs.
|
|
98
|
+
* @param config The configuration controlling marker visibility based on [SectionType]($common), [ModelSelectorState]($frontend), and [CategorySelectorState]($frontend).
|
|
99
|
+
* @returns true if the marker should be displayed; false to make it invisible.
|
|
100
|
+
* @see [[HyperModelingDecorator.requestSync]] to force the decorator to reevaluate marker visibility when the criterion used by your implementation of this method changes.
|
|
101
|
+
*/
|
|
102
|
+
isMarkerVisible(marker, decorator, config) {
|
|
103
|
+
if (undefined !== config.hiddenSectionTypes && config.hiddenSectionTypes.includes(marker.state.sectionType))
|
|
104
|
+
return false;
|
|
105
|
+
if (!config.ignoreCategorySelector && !decorator.viewport.view.viewsCategory(marker.state.category))
|
|
106
|
+
return false;
|
|
107
|
+
if (!config.ignoreModelSelector && !decorator.viewport.view.viewsModel(marker.state.model))
|
|
108
|
+
return false;
|
|
109
|
+
return true;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
exports.SectionMarkerHandler = SectionMarkerHandler;
|
|
113
113
|
//# sourceMappingURL=SectionMarkerHandler.js.map
|
|
@@ -1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CAAC;oBAClB,UAAU,EAAE,SAAS,MAAK,MAAA,MAAM,CAAC,KAAK,CAAC,cAAc,0CAAE,MAAM,CAAA;iBAC9D;aACF;SACF,CAAC;IACJ,CAAC;IAED;;OAEG;IACI,KAAK,CAAC,cAAc,CAAC,SAAiB,EAAE,MAAqB,EAAE,SAAiC;QACrG,QAAQ,SAAS,EAAE;YACjB,KAAK,YAAY;gBACf,MAAM,SAAS,CAAC,gBAAgB,CAAC,MAAM,CAAC,CAAC;gBACzC,MAAM;YACR,KAAK,cAAc;gBACjB,MAAM,SAAS,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;gBACpC,MAAM;YACR,KAAK,YAAY;gBACf,MAAM,SAAS,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;gBAClC,MAAM;SACT;IACH,CAAC;IAED;;;;;;;;;;;;;;OAcG;IACI,eAAe,CAAC,MAAqB,EAAE,SAAiC,EAAE,MAA2B;QAC1G,IAAI,SAAS,KAAK,MAAM,CAAC,kBAAkB,IAAI,MAAM,CAAC,kBAAkB,CAAC,QAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,WAAW,CAAC;YACzG,OAAO,KAAK,CAAC;QAEf,IAAI,CAAC,MAAM,CAAC,sBAAsB,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC;YACjG,OAAO,KAAK,CAAC;QAEf,IAAI,CAAC,MAAM,CAAC,mBAAmB,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC;YACxF,OAAO,KAAK,CAAC;QAEf,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AA9FD,oDA8FC","sourcesContent":["/*---------------------------------------------------------------------------------------------\
|
|
1
|
+
{"version":3,"file":"SectionMarkerHandler.js","sourceRoot":"","sources":["../../src/SectionMarkerHandler.ts"],"names":[],"mappings":";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ACF;SACF,CAAC;IACJ,CAAC;IAED;;OAEG;IACI,KAAK,CAAC,cAAc,CAAC,SAAiB,EAAE,MAAqB,EAAE,SAAiC;QACrG,QAAQ,SAAS,EAAE;YACjB,KAAK,YAAY;gBACf,MAAM,SAAS,CAAC,gBAAgB,CAAC,MAAM,CAAC,CAAC;gBACzC,MAAM;YACR,KAAK,cAAc;gBACjB,MAAM,SAAS,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;gBACpC,MAAM;YACR,KAAK,YAAY;gBACf,MAAM,SAAS,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;gBAClC,MAAM;SACT;IACH,CAAC;IAED;;;;;;;;;;;;;;OAcG;IACI,eAAe,CAAC,MAAqB,EAAE,SAAiC,EAAE,MAA2B;QAC1G,IAAI,SAAS,KAAK,MAAM,CAAC,kBAAkB,IAAI,MAAM,CAAC,kBAAkB,CAAC,QAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,WAAW,CAAC;YACzG,OAAO,KAAK,CAAC;QAEf,IAAI,CAAC,MAAM,CAAC,sBAAsB,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC;YACjG,OAAO,KAAK,CAAC;QAEf,IAAI,CAAC,MAAM,CAAC,mBAAmB,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC;YACxF,OAAO,KAAK,CAAC;QAEf,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AA9FD,oDA8FC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module HyperModeling\n */\n\nimport { IModelApp } from \"@itwin/core-frontend\";\nimport type { AbstractToolbarProps } from \"@itwin/appui-abstract\";\nimport { SectionMarker } from \"./SectionMarkers\";\nimport { SectionMarkerConfig } from \"./HyperModelingConfig\";\nimport { HyperModelingDecorator } from \"./HyperModelingDecorator\";\n\n/** Supplies interactions with [[SectionMarker]]s, including a mini-toolbar displayed when the mouse hovers over a marker and what action occurs when the user clicks a marker.\n * The base implementation supplies the following interactions:\n * * Click: Toggle display of the section graphics and clip volume; apply the section's spatial view if toggling on.\n * * Toolbar:\n * * Apply Section: Applies the section location's spatial view to the viewport and displays the 2d section graphics.\n * * Open Drawing: Navigates to the section drawing view. By default, this applies the section drawing view to the viewport.\n * * Open Sheet: Navigates to the [ViewAttachment]($backend) of the section drawing on a [Sheet]($backend). Disabled if no such attachment exists.\n * @see [[HyperModelingConfig]] to override the default handler by supplying a subclass of `SectionMarkerHandler`.\n * @see [[HyperModelingDecorator]] for various methods that might be usefully wired up to marker click or toolbar actions.\n * @public\n */\nexport class SectionMarkerHandler {\n /** Respond to activation of the specified marker. Return true if the marker should become the active marker - i.e., if the marker was successfully activated.\n * @see [[SectionMarkerHandler.deactivateMarker]].\n */\n public async activateMarker(marker: SectionMarker, decorator: HyperModelingDecorator): Promise<boolean> {\n return decorator.toggleSection(marker, true);\n }\n\n /** Respond to deactivation of the specified marker. Invoked when the user clicks on the marker while it is the active marker.\n * This should perform the inverse of [[SectionMarkerHandler.activateMarker]]. The marker becomes inactive as a result.\n */\n public async deactivateMarker(marker: SectionMarker, decorator: HyperModelingDecorator): Promise<void> {\n await decorator.toggleSection(marker, false);\n }\n\n /** Return toolbar items for the specified marker. If the array of toolbar items is empty, no toolbar will be displayed.\n * @see [[executeCommand]] to implement each toolbar command.\n */\n public getToolbarProps(marker: SectionMarker, _decorator: HyperModelingDecorator): AbstractToolbarProps {\n const localization = IModelApp.localization;\n return {\n items: [\n {\n id: \"apply_view\",\n itemPriority: 10,\n label: localization.getLocalizedString(\"HyperModeling:Message.ApplyView\"),\n icon: \"icon-spatial-view-apply\",\n execute: () => { },\n isDisabled: false,\n },\n {\n id: \"open_section\",\n itemPriority: 20,\n label: localization.getLocalizedString(\"HyperModeling:Message.OpenSection\"),\n icon: \"icon-plan-drawing\",\n execute: () => { },\n isDisabled: false,\n },\n {\n id: \"open_sheet\",\n itemPriority: 30,\n label: localization.getLocalizedString(\"HyperModeling:Message.OpenSheet\"),\n icon: \"icon-plan-floor\",\n execute: () => { },\n isDisabled: undefined === marker.state.viewAttachment?.viewId,\n },\n ],\n };\n }\n\n /** Execute the command associated with the specified tool bar item.\n * @see [[getToolbarProps]] to define the set of commands.\n */\n public async executeCommand(commandId: string, marker: SectionMarker, decorator: HyperModelingDecorator): Promise<void> {\n switch (commandId) {\n case \"apply_view\":\n await decorator.applySpatialView(marker);\n break;\n case \"open_section\":\n await decorator.openSection(marker);\n break;\n case \"open_sheet\":\n await decorator.openSheet(marker);\n break;\n }\n }\n\n /** Customize which markers are visible. [[HyperModelingDecorator]] determines marker visibility as follows:\n * - If a marker is currently active (selected), only that marker is visible.\n * - Otherwise, the marker is visible if this method returns `true`.\n * The default implementation of this method determines visibility based on the [[SectionMarkerConfig]] as follows.\n * - If the marker is of a type included in the config's `hiddenSectionTypes`, it is invisible.\n * - If the marker belongs to a model not currently displayed in the viewport and the config's `ignoreModelSelector` is false, it is invisible.\n * - If the marker belongs to a category not currently displayed in the viewport and the config's `ignoreCategorySelector` is false, it is invisible,\n * - Otherwise, the marker is visible, unless this method returns `false`.\n * The default implementation of this method always returns `true`\n * @param marker The marker whose visibility is to be determined.\n * @param decorator The hypermodeling decorator to which the marker belongs.\n * @param config The configuration controlling marker visibility based on [SectionType]($common), [ModelSelectorState]($frontend), and [CategorySelectorState]($frontend).\n * @returns true if the marker should be displayed; false to make it invisible.\n * @see [[HyperModelingDecorator.requestSync]] to force the decorator to reevaluate marker visibility when the criterion used by your implementation of this method changes.\n */\n public isMarkerVisible(marker: SectionMarker, decorator: HyperModelingDecorator, config: SectionMarkerConfig): boolean {\n if (undefined !== config.hiddenSectionTypes && config.hiddenSectionTypes.includes(marker.state.sectionType))\n return false;\n\n if (!config.ignoreCategorySelector && !decorator.viewport.view.viewsCategory(marker.state.category))\n return false;\n\n if (!config.ignoreModelSelector && !decorator.viewport.view.viewsModel(marker.state.model))\n return false;\n\n return true;\n }\n}\n"]}
|