- CSS Classes
Core API
- Design
Path
- Path._curve()
- Path.addClass()
- Path.addText()
- Path.asPathString()
- Path.asRenderProps()
- Path.attr()
- Path.bbox()
- Path.clean()
- Path.clone()
- Path.close()
- Path.combine()
- Path.curve()
- Path.curve_()
- Path.divide()
- Path.edge()
- Path.end()
- Path.hide()
- Path.insop()
- Path.intersects()
- Path.intersectsX()
- Path.intersectsY()
- Path.join()
- Path.length()
- Path.line()
- Path.move()
- Path.noop()
- Path.offset()
- Path.reverse()
- Path.rotate()
- Path.roughLength()
- Path.setClass()
- Path.setHidden()
- Path.setText()
- Path.shiftAlong()
- Path.shiftFractionAlong()
- Path.smurve()
- Path.smurve_()
- Path.split()
- Path.start()
- Path.translate()
- Path.trim()
- Path.unhide()
Point
- Point.addCircle()
- Point.addText()
- Point.angle()
- Point.asRenderProps()
- Point.attr()
- Point.clone()
- Point.copy()
- Point.dist()
- Point.dx()
- Point.dy()
- Point.flipX()
- Point.flipY()
- Point.rotate()
- Point.setCircle()
- Point.setText()
- Point.shift()
- Point.shiftFractionTowards()
- Point.shiftOutwards()
- Point.shiftTowards()
- Point.sitsOn()
- Point.sitsRoughlyOn()
- Point.slope()
- Point.translate()
utils
- utils.applyTransformToPoint()
- utils.beamIntersectsCircle()
- utils.beamIntersectsCurve()
- utils.beamIntersectsX()
- utils.beamIntersectsY()
- utils.beamsIntersect()
- utils.capitalize()
- utils.circlesIntersect()
- utils.combineTransform()
- utils.curveEdge()
- utils.curveIntersectsX()
- utils.curveIntersectsY()
- utils.curvesIntersect()
- utils.deg2rad()
- utils.generateStackTransform()
- utils.getTransformedBounds()
- utils.lineIntersectsCircle()
- utils.lineIntersectsCurve()
- utils.linesIntersect()
- utils.mergeI18n()
- utils.mergeOptions()
- utils.pctBasedOn()
- utils.pointOnBeam()
- utils.pointOnCurve()
- utils.pointOnLine()
- utils.rad2deg()
- utils.round()
- utils.splitCurve()
- utils.stretchToScale()
- utils.units()
Macros
- banner
- bannerBox
- bartack
- bartackAlong
- bartackFractionAlong
- crossBox
- cutOnFold
- flip
- gore
- grainline
- hd
- ld
- miniScale
- mirror
- pd
- pleat
- ringSector
- rmBanner
- rmBannerBox
- rmBartack
- rmBartackAlong
- rmBartackFractionAlong
- rmCrossBox
- rmCutOnFold
- rmGrainline
- rmHd
- rmLd
- rmMiniScale
- rmPd
- rmPleat
- rmRingSector
- rmScaleBox
- rmSewTogether
- rmTitle
- rmVd
- rmaD
- rmaHd
- rmaLd
- rmaPd
- rmaVd
- round
- scalebox
- sewTogether
- sprinkle
- title
- vd
- Measurements
Store Methods
- cutlist.addCut()
- cutlist.removeCut()
- cutlist.setCutOnFold()
- cutlist.setGrain()
- flag.error()
- flag.fixme()
- flag.info()
- flag.note()
- flag.preset()
- flag.tip()
- flag.warn()
- generateMacroIds()
- getMacroIds()
- log.debug()
- log.error()
- log.info()
- log.warn()
- pack()
- removeMacroNodes()
- storeMacroIds()
- unflag.error()
- unflag.fixme()
- unflag.info()
- unflag.note()
- unflag.preset()
- unflag.tip()
- unflag.warn()
- Web of Trust
- Reference
- Core API
- Part
- Parts: Configuration
- Part options
- Counter options
Counter options
For a given number of things, use a counter option. Counters are for integers only. Things like number of buttons and so on.
Structure
Your counter option should be a plain object with these properties:
count
: The default integer valuemin
: The minimum integer value that’s allowedmax
: The maximum integer value that’s allowed
TIP
Like all options that are configured through an object, you can add more properties to the options’ object to implement functionality on top of what’s provided by the core library.
Refer to extending options for more details.
Example
Javascript
options: {
butttons: {
count: 7,
min: 4,
max: 12
}
}
Contents by
- Authors:
- Maintainers:
- Last updated: 2 months ago