evCreate API 5.7 Help

SetViewCenter Function

Moves the magnified area of a given lens item to a given new position in an Envision document currently opened in the Canvas Envision Creator app.

SetViewCenter(lensObj: [[[EvItem|canvas-envision-document-items.html#object-items]]], viewCenter: [[[EvCoord2D|evcoord2d-type-alias.html]]]): Promise<void>

Parameters

lensObj: EvItem

An Object item object, a lens item from the Envision document currently opened in the Canvas Envision Creator app whose magnified area should be moved to the given new position.

If a given object item is not a lens, the function throws an error.

viewCenter: EvCoord2D

An EvCoord2D type alias, an array of the X and Y coordinates of a given new position of the center of the magnified area.

Return value

Promise<void>

A Promise that, if fulfilled, resolves to void if the magnified area of the given lens item has been successfully moved to the given position in the current document.

03 April 2025