https://github.com/m4b/silicon-image
Displays a rasterized binary image with `silicon-image-behavior`, to update binary offsets via mouse movement, and etc.
https://github.com/m4b/silicon-image
Last synced: 3 months ago
JSON representation
Displays a rasterized binary image with `silicon-image-behavior`, to update binary offsets via mouse movement, and etc.
- Host: GitHub
- URL: https://github.com/m4b/silicon-image
- Owner: m4b
- License: bsd-3-clause
- Created: 2015-08-16T21:19:14.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2015-08-24T17:58:12.000Z (almost 11 years ago)
- Last Synced: 2025-02-23T10:16:48.997Z (over 1 year ago)
- Language: HTML
- Size: 1.8 MB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ``
Displays a rasterized binary image with `silicon-image-behavior`. You need to provide your own containing block, as the element has `absolute` positioning so that other images can be stacked.
I suggest something like this if you've got it wrapped in a `
`, which itself is in a flexbox:
```css
div {
flex: 1 1 0;
width: 412px;
overflow-y: scroll;
position: relative;
background-color: grey;
margin-bottom: 8px;
}
```
or something like this div, if no flexbox:
```css
div {
overflow-y: scroll;
height: 200px;
width: 412px;
position: absolute;
background-color: grey;
}
```
Example:
```html
```
As the mouse moves over the image, `offset` is updated, so listen for an `offset-changed` event, or two-way data-bind to `offset` if you're using Polymer.
See the [documentation](http://m4b.github.io/silicon-image) for more information.
# Install
Via bower:
`bower install silicon-image`
As with all Silicon Elements, this requires Polymer, and the webcomponents polyfill (for now).
Example:
```html
```