ChartDirector 6.0 (Ruby Edition)

JsViewPortControl.setMouseMargin


Usage

setMouseMargin(mouseMargin, cornerMargin)

Description

Sets the margin around the viewport border for mouse drag.

The viewport border can be as thin as 1 pixel, and it is hard to position the mouse over the border to drag it. To make it easier to drag the border, dragging can start if the mouse is within a certain margin from the border.

If both vertical and horizontal zooming is allowed, the viewport corners can be dragged diagonally to resize the viewport in both directions at the same time. To distinguish between dragging the corners and the borders, if the mouse is within a certain margin from the corner when the dragging starts, it is considered to be dragging the corner.

In either case, the mouse cursor will change to let the user know if the border or corner can be dragged.

Arguments

ArgumentDefaultDescription
mouseMargin(Mandatory)The margin around the viewport border within which dragging of the border can start. The margin is in pixel unit. The default is 4 pixels.
cornerMargin(Mandatory)The margin around the viewport corner within which dragging of the corner can start. The margin is in pixel unit. The default is 8 pixels.

Return Value

None