我正在尝试为类型范围的inputSurface设置min max属性,但它不起作用。生成的输入元素没有最小/最大属性。
我的代码:
var moveDown = this.options.flyerSheetHeight + this.options.flyerItemHeight + 2;
var downModifier = new StateModifier({
transform: Transform.translate(0, moveDown, 0)
});
var flyerItemGenSurface = new InputSurface({
size: [this.options.flyerSheetWidth, 5],
type: 'range',
min: 1,
max: 10,
properties: {
zIndex: 1,
}
});
this.mainNode.add(downModifier).add(flyerItemGenSurface);
答案 0 :(得分:2)
var moveDown = this.options.flyerSheetHeight + this.options.flyerItemHeight + 2;
var downModifier = new StateModifier({
transform: Transform.translate(0, moveDown, 0)
});
var flyerItemGenSurface = new InputSurface({
size: [this.options.flyerSheetWidth, 5],
type: 'range',
properties: {
zIndex: 1,
},
attributes: {
min: 1,
max: 10
}
});
this.mainNode.add(downModifier).add(flyerItemGenSurface);
编辑:woops