Tapemeasure

Element

A tape measure can be used to measure distances between points.

The two defining points of the tape measure (which is a segment) do not inherit by default the attribute visible from the segment. Otherwise the tape meassure would be inaccessible if the two points coincide and the segment is hidden.

Usage (signatures)
board.create('tapemeasure', [start, end]);

The two arrays give the initial position where the tape measure is positioned.

Parameters
Name Type Description
start Array

[x, y]

end Array

[x, y]

Example
// Create a tape measure
var p1 = board.create('point', [0,0]);
var p2 = board.create('point', [1,1]);
var p3 = board.create('point', [3,1]);
var tape = board.create('tapemeasure', [[1, 2], [4, 2]], {name:'dist'});
Attributes

Own

digits

Description

The precision of the tape measure value displayed in the optional text.

Type
Number
Default Value
2
Source
options.js, line 9845

label

Description

Attributes for the tape measure label.

Type
Label
Source
options.js, line 9927

point1

Description

Attributes for first helper point defining the tape measure position.

Type
Point
Source
options.js, line 9855

point2

Description

Attributes for second helper point defining the tape measure position.

Type
Point
Source
options.js, line 9877

precision

Description

The precision of the tape measure value displayed in the optional text. Replaced by the attribute digits

Type
Number
Deprecated
Yes
Default Value
2
See
Source
options.js, line 9831

rotate

Description

Text rotation in degrees.

Type
Number
Default Value
0
Source
options.js, line 9821

ticks

Description

Attributes for the ticks of the tape measure.

Type
Ticks
Source
options.js, line 9899

withLabel

Description

Show tape measure label.

Type
Boolean
Default Value
true
Source
options.js, line 9811

withTicks

Description

Show tape measure ticks.

Type
Boolean
Default Value
true
Source
options.js, line 9801

Inherited

none

Methods

Own

Value() → {Number}

Returns the length of the tape measure.

Returns

length of tape measure.

Type
Number

Details

Source
element/measure.js, line 153

Inherited

none

Throws

If the element cannot be constructed with the given parent objects an exception is thrown.

Type
Exception

Details

Type
JXG.Segment
Source
element/measure.js, line 46