This file contains 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
require("./famous-polyfills/index"); | |
require('domready')(function () { | |
var Engine = require('./famous/core/Engine'); | |
var InputSurface = require('./famous/surfaces/InputSurface'); | |
var StateModifier = require('./famous/modifiers/StateModifier'); | |
var ContainerSurface = require('./famous/surfaces/ContainerSurface'); | |
var Scrollview = require('./famous/views/Scrollview'); | |
// create the main context | |
var mainContext = Engine.createContext(); | |
var wrapper = new ContainerSurface({ | |
size: [undefined, undefined], | |
}); | |
var chatWrapper = new ContainerSurface({ | |
size: [false, undefined], | |
properties: { | |
width: '80%', | |
backgroundColor: 'blue' | |
} | |
}); | |
var chatDisplay = new Scrollview({ | |
size: [undefined, false], | |
properties: { | |
height: '80%', | |
backgroundColor: 'red' | |
} | |
}); | |
var chatMessages = []; | |
chatDisplay.sequenceFrom(chatMessages); | |
chatWrapper.add(chatDisplay); | |
wrapper.add(chatWrapper) | |
mainContext.add(wrapper); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment