@univerjssheets-uiindexclassesSheetcanvaspopmanagerservice

@univerjs/sheets-ui v0.5.4


Class: SheetCanvasPopManagerService

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

Extends

Constructors

new SheetCanvasPopManagerService()

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

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

Parameters

ParameterType
_globalPopupManagerServiceICanvasPopupService
_renderManagerServiceIRenderManagerService
_univerInstanceServiceIUniverInstanceService
_refRangeServiceRefRangeService
_commandServiceICommandService
_refSelectionsServiceISheetSelectionRenderService
_selectionManagerServiceSheetsSelectionsService

Returns

SheetCanvasPopManagerService

Overrides

Disposable.constructor

Properties

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

Methods

attachPopupByPosition()

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

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

Parameters

ParameterType
boundIBoundRectNoAngle
popupICanvasPopup
locationISheetLocationBase

Returns

Nullable<INeedCheckDisposable>


attachPopupToAbsolutePosition()

attachPopupToAbsolutePosition(
   bound, 
   popup, 
   _unitId?, 
   _subUnitId?): 
  | undefined
  | null
  | {
  canDispose: () => boolean;
  dispose: () => void;
}

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

Parameters

ParameterType
boundIBoundRectNoAngle
popupICanvasPopup
_unitId?string
_subUnitId?string

Returns

| undefined | null | { canDispose: () => boolean; dispose: () => void; }


attachPopupToCell()

attachPopupToCell(
   row, 
   col, 
   popup, 
   _unitId?, 
   _subUnitId?, 
viewport?): Nullable<INeedCheckDisposable>

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

Parameters

ParameterType
rownumber
colnumber
popupICanvasPopup
_unitId?string
_subUnitId?string
viewport?Viewport

Returns

Nullable<INeedCheckDisposable>


attachPopupToObject()

attachPopupToObject(targetObject, popup): INeedCheckDisposable

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

attach a popup to canvas object

Parameters

ParameterTypeDescription
targetObjectBaseObjecttarget canvas object
popupICanvasPopuppopup item

Returns

INeedCheckDisposable

disposable


dispose()

dispose(): void

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

Returns

void

Overrides

Disposable.dispose


disposeWithMe()

disposeWithMe(disposable): IDisposable

Defined in: submodules/univer/packages/core/src/shared/lifecycle.ts:99

Parameters

ParameterType
disposableDisposableLike

Returns

IDisposable

Inherited from

Disposable.disposeWithMe


ensureNotDisposed()

protected ensureNotDisposed(): void

Defined in: submodules/univer/packages/core/src/shared/lifecycle.ts:103

Returns

void

Inherited from

Disposable.ensureNotDisposed


getFeatureMenu()

getFeatureMenu(
   unitId, 
   subUnitId, 
   drawingId, 
drawingType): Nullable<IPopupMenuItem[]>

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

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


registerFeatureMenu()

registerFeatureMenu(type, getPopupMenuCallBack): void

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

Register a feature menu callback for a specific drawing type.such as image, chart, etc.

Parameters

ParameterType
typeDrawingTypeEnum
getPopupMenuCallBackgetPopupMenuItemCallback

Returns

void