Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ryohey/easeljs-scrollcontainer
Scrollable Container in CreateJS
https://github.com/ryohey/easeljs-scrollcontainer
Last synced: about 1 month ago
JSON representation
Scrollable Container in CreateJS
- Host: GitHub
- URL: https://github.com/ryohey/easeljs-scrollcontainer
- Owner: ryohey
- License: mit
- Created: 2016-05-07T09:08:52.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2021-02-17T12:02:19.000Z (over 3 years ago)
- Last Synced: 2024-05-01T23:42:56.052Z (7 months ago)
- Language: JavaScript
- Homepage:
- Size: 8.79 KB
- Stars: 7
- Watchers: 3
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# EaselJS-ScrollContainer
![2016-05-07 18 38 56](https://cloud.githubusercontent.com/assets/5355966/15091406/45bd814c-1483-11e6-8ca8-24e80be7efeb.png)
EaselJS extension adds ScrollContainer to CreateJS.
ScrollContainer provides scroll bars and you can use as normal Container.
## Usage
1. instantiate ScrollContainer with canvas element
2. set contentSize and bounds to calculate bar size
3. add to stage
4. add object to ScrollContainer by calling `addChild````js
const scroll = new createjs.ScrollContainer(canvas)
scroll.setBounds(0, 0, 520, 300)
scroll.contentSize = {
width: 1200,
height: 960
}
stage.addChild(scroll)const circle = new createjs.Shape()
circle.graphics.beginFill("DeepSkyBlue").drawCircle(0, 0, 50)
circle.x = 100
circle.y = 100
scroll.addChild(circle)
```## Features
- Shows scroll bar like Windows 10
- Scroll by the mouse wheel
- Scroll by bar dragging