2014-10-20 85 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

相關問題