@univerjs/sheets-ui v0.5.0-beta.1 • Docs
Class: SheetCanvasPopManagerService
Extends
Constructors
new SheetCanvasPopManagerService()
new SheetCanvasPopManagerService(
_globalPopupManagerService,
_renderManagerService,
_univerInstanceService,
_refRangeService,
_commandService): SheetCanvasPopManagerService
Parameters
Parameter | Type |
---|---|
_globalPopupManagerService | ICanvasPopupService |
_renderManagerService | IRenderManagerService |
_univerInstanceService | IUniverInstanceService |
_refRangeService | RefRangeService |
_commandService | ICommandService |
Returns
Overrides
Defined in
submodules/univer/packages/sheets-ui/src/services/canvas-pop-manager.service.ts:49
Properties
Property | Modifier | Type | Default value | Inherited from | Defined in |
---|---|---|---|---|---|
_disposed | protected | boolean | false | Disposable ._disposed | submodules/univer/packages/core/src/shared/lifecycle.ts:93 |
Methods
attachPopupByPosition()
attachPopupByPosition(
bound,
popup,
location): Nullable<INeedCheckDisposable>
Parameters
Parameter | Type |
---|---|
bound | IBoundRectNoAngle |
popup | ICanvasPopup |
location | ISheetLocationBase |
Returns
Nullable
<INeedCheckDisposable
>
Defined in
submodules/univer/packages/sheets-ui/src/services/canvas-pop-manager.service.ts:273
attachPopupToAbsolutePosition()
attachPopupToAbsolutePosition(
bound,
popup,
_unitId?,
_subUnitId?): null | {
canDispose: () => boolean;
dispose: () => void;
}
Parameters
Parameter | Type |
---|---|
bound | IBoundRectNoAngle |
popup | ICanvasPopup |
_unitId ? | string |
_subUnitId ? | string |
Returns
null
| {
canDispose
: () => boolean
;
dispose
: () => void
;
}
Defined in
submodules/univer/packages/sheets-ui/src/services/canvas-pop-manager.service.ts:326
attachPopupToCell()
attachPopupToCell(
row,
col,
popup,
_unitId?,
_subUnitId?,
viewport?,
showOnSelectionMoving?): Nullable<INeedCheckDisposable>
Parameters
Parameter | Type | Default value |
---|---|---|
row | number | undefined |
col | number | undefined |
popup | ICanvasPopup | undefined |
_unitId ? | string | undefined |
_subUnitId ? | string | undefined |
viewport ? | Viewport | undefined |
showOnSelectionMoving ? | boolean | false |
Returns
Nullable
<INeedCheckDisposable
>
Defined in
submodules/univer/packages/sheets-ui/src/services/canvas-pop-manager.service.ts:381
attachPopupToObject()
attachPopupToObject(targetObject, popup): INeedCheckDisposable
attach a popup to canvas object
Parameters
Parameter | Type | Description |
---|---|---|
targetObject | BaseObject | target canvas object |
popup | ICanvasPopup | popup item |
Returns
disposable
Defined in
submodules/univer/packages/sheets-ui/src/services/canvas-pop-manager.service.ts:214
dispose()
dispose(): void
Returns
void
Overrides
Defined in
submodules/univer/packages/sheets-ui/src/services/canvas-pop-manager.service.ts:81
disposeWithMe()
disposeWithMe(disposable): IDisposable
Parameters
Parameter | Type |
---|---|
disposable | DisposableLike |
Returns
Inherited from
Defined in
submodules/univer/packages/core/src/shared/lifecycle.ts:96
ensureNotDisposed()
protected ensureNotDisposed(): void
Returns
void
Inherited from
Defined in
submodules/univer/packages/core/src/shared/lifecycle.ts:100
getFeatureMenu()
getFeatureMenu(
unitId,
subUnitId,
drawingId,
drawingType): Nullable<IPopupMenuItem[]>
Get the feature menu by drawing type, the function should be called when a drawing element need trigger popup menu, so the unitId, subUnitId, drawingId should be provided.
Parameters
Parameter | Type | Description |
---|---|---|
unitId | string | the unit id |
subUnitId | string | the sub unit id |
drawingId | string | the drawing id |
drawingType | DrawingTypeEnum | the feature type |
Returns
Nullable
<IPopupMenuItem
[]>
the feature menu if it exists, otherwise return undefined
Defined in
submodules/univer/packages/sheets-ui/src/services/canvas-pop-manager.service.ts:74
registerFeatureMenu()
registerFeatureMenu(type, getPopupMenuCallBack): void
Register a feature menu callback for a specific drawing type.such as image, chart, etc.
Parameters
Parameter | Type |
---|---|
type | DrawingTypeEnum |
getPopupMenuCallBack | getPopupMenuItemCallback |
Returns
void
Defined in
submodules/univer/packages/sheets-ui/src/services/canvas-pop-manager.service.ts:62