@quartic/bokehjs
Version:
Interactive, novel data visualization
48 lines (38 loc) • 1.18 kB
text/coffeescript
import {Range} from "./range"
import * as p from "core/properties"
export class Range1d extends Range
type: 'Range1d'
{
start: [ p.Number, 0 ]
end: [ p.Number, 1 ]
bounds: [ p.Any ] # TODO (bev)
min_interval: [ p.Any ]
max_interval: [ p.Any ]
}
_set_auto_bounds: () ->
if == 'auto'
min = Math.min(, )
max = Math.max(, )
constructor: () ->
# new Range1d({start: start, end: end}) or Range1d(start, end)
if this instanceof Range1d
return super(arguments...)
else
[start, end] = arguments
return new Range1d({start: start, end: end})
initialize: (attrs, options) ->
super(attrs, options)
=
=
{
min: () -> Math.min(, )
max: () -> Math.max(, )
}
reset: () ->
if != or !=
else