This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var Engine = require("famous/core/Engine"); | |
| var Surface = require("famous/core/Surface"); | |
| var Scrollview = require("famous/views/Scrollview"); | |
| var ContainerSurface = require('famous/surfaces/ContainerSurface'); | |
| var mainContext = Engine.createContext(); | |
| var scrollview = new Scrollview(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var scrollToPosition = function (finalPos, transition) { | |
| var lastPos = scroller.getPosition(); | |
| var transitionable = new Transitionable(lastPos); | |
| var prerender = function () { | |
| scroller.setVelocity(0); | |
| scroller.setPosition(transitionable.get()); | |
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class JTTrueSizeSurface | |
| @DEFAULT_OPTIONS = {} | |
| JTTrueSizeSurface.prototype = Object.create(Surface.prototype) | |
| JTTrueSizeSurface.prototype.constructor = JTTrueSizeSurface | |
| constructor: (id) -> | |
| @id = id | |
| Surface.apply(this, arguments) | |
| @size = this.getSize() |
NewerOlder