2014-10-20 93 views
1

我正在尝试为类型范围的inputSurface设置最小最大属性,但它不起作用。生成的输入元素不具有最小/最大属性。famo.us输入表面类型范围最小/最大属性

我的代码:

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); 

回答

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

+0

谢谢!有用! – Filip 2014-10-21 01:16:58

+0

然后,如果可以的话,将其标记为答案并注册为有礼貌。 :) – talves 2014-10-21 22:52:05

相关问题