@univerjssheets-uiindexclassesSheetcanvaspopmanagerservice

@univerjs/sheets-ui v0.5.0-beta.1Docs


Class: SheetCanvasPopManagerService

Extends

Constructors

new SheetCanvasPopManagerService()

new SheetCanvasPopManagerService(
   _globalPopupManagerService, 
   _renderManagerService, 
   _univerInstanceService, 
   _refRangeService, 
   _commandService): SheetCanvasPopManagerService

Parameters

ParameterType
_globalPopupManagerServiceICanvasPopupService
_renderManagerServiceIRenderManagerService
_univerInstanceServiceIUniverInstanceService
_refRangeServiceRefRangeService
_commandServiceICommandService

Returns

SheetCanvasPopManagerService

Overrides

Disposable.constructor

Defined in

submodules/univer/packages/sheets-ui/src/services/canvas-pop-manager.service.ts:49

Properties

PropertyModifierTypeDefault valueInherited fromDefined in
_disposedprotectedbooleanfalseDisposable._disposedsubmodules/univer/packages/core/src/shared/lifecycle.ts:93

Methods

attachPopupByPosition()

attachPopupByPosition(
   bound, 
   popup, 
location): Nullable<INeedCheckDisposable>

Parameters

ParameterType
boundIBoundRectNoAngle
popupICanvasPopup
locationISheetLocationBase

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

ParameterType
boundIBoundRectNoAngle
popupICanvasPopup
_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

ParameterTypeDefault value
rownumberundefined
colnumberundefined
popupICanvasPopupundefined
_unitId?stringundefined
_subUnitId?stringundefined
viewport?Viewportundefined
showOnSelectionMoving?booleanfalse

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

ParameterTypeDescription
targetObjectBaseObjecttarget canvas object
popupICanvasPopuppopup item

Returns

INeedCheckDisposable

disposable

Defined in

submodules/univer/packages/sheets-ui/src/services/canvas-pop-manager.service.ts:214


dispose()

dispose(): void

Returns

void

Overrides

Disposable.dispose

Defined in

submodules/univer/packages/sheets-ui/src/services/canvas-pop-manager.service.ts:81


disposeWithMe()

disposeWithMe(disposable): IDisposable

Parameters

ParameterType
disposableDisposableLike

Returns

IDisposable

Inherited from

Disposable.disposeWithMe

Defined in

submodules/univer/packages/core/src/shared/lifecycle.ts:96


ensureNotDisposed()

protected ensureNotDisposed(): void

Returns

void

Inherited from

Disposable.ensureNotDisposed

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

ParameterTypeDescription
unitIdstringthe unit id
subUnitIdstringthe sub unit id
drawingIdstringthe drawing id
drawingTypeDrawingTypeEnumthe 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

ParameterType
typeDrawingTypeEnum
getPopupMenuCallBackgetPopupMenuItemCallback

Returns

void

Defined in

submodules/univer/packages/sheets-ui/src/services/canvas-pop-manager.service.ts:62