SpreadJS 14
GC.Spread.Sheets.Shapes Namespace / ShapeCollection type / addCameraShape Method
The name of the camera shape. If leave blank an unique name will be generated.
The range of the shape generated from, it should be a range formula, like Sheet1!A1:A8.
The x location of the camera shape, if leave blank the default value will be 0.
The y location of the camera shape, if leave blank the default value will be 0.
The width of the camera shape, if leave blank the default value should be same as the original range width.
The height of the camera shape, if leave blank the default value should be same as the original range height.
In This Topic
    addCameraShape Method
    In This Topic
    Add a new camera shape to shape collection
    Syntax
    var instance = new GC.Spread.Sheets.Shapes.ShapeCollection(sheet);
    var value; // Type: CameraShape
    value = instance.addCameraShape(name, range, left, top, width, height);
    function addCameraShape( 
       name : string,
       range : string,
       (optional) left : number,
       (optional) top : number,
       (optional) width : number,
       (optional) height : number
    ) : CameraShape;

    Parameters

    name
    The name of the camera shape. If leave blank an unique name will be generated.
    range
    The range of the shape generated from, it should be a range formula, like Sheet1!A1:A8.
    left
    The x location of the camera shape, if leave blank the default value will be 0.
    top
    The y location of the camera shape, if leave blank the default value will be 0.
    width
    The width of the camera shape, if leave blank the default value should be same as the original range width.
    height
    The height of the camera shape, if leave blank the default value should be same as the original range height.
    Example
    // This example shows how to add a new camera shape
    var shape = activeSheet.shapes.addCameraShape("camera shape 1", 'Sheet1!A1:A8', 100, 50, 100, 150);
    See Also