flutter/examples/example-scrollable.sky
Adam Barth 46334e2e32 Add wheel support to sky-scrollable
This CL plumbs wheel events through Sky again and uses them in sky-scrollable.

R=ojan@chromium.org

Review URL: https://codereview.chromium.org/876853005
2015-01-27 09:58:22 -08:00

43 lines
917 B
Plaintext

<!--
// Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-->
<sky>
<import src="/sky/framework/sky-element/sky-element.sky" as="SkyElement" />
<import src="/sky/framework/sky-scrollable.sky" />
<import src="data/cities.sky" as="cities" />
<sky-element name="example-scrollable">
<template>
<style>
sky-scrollable {
margin: 20px;
height: 400px;
border: 2px solid blue;
}
b {
display: inline;
font-weight: bold;
}
</style>
<sky-scrollable>
<template repeat="{{ cities }}">
<template>
<div>{{ name }}</div>
</template>
</template>
</sky-scrollable>
</template>
<script>
module.exports = class extends SkyElement {
created() {
this.cities = cities.slice(0, 300);
}
}.register();
</script>
</sky-element>
<example-scrollable />
</sky>