| Index: example/streams/mouse_resize_image.html
|
| diff --git a/example/streams/mouse_resize_image.html b/example/streams/mouse_resize_image.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..82f053f617d5ef06cbc38b77f216720cf48ce835
|
| --- /dev/null
|
| +++ b/example/streams/mouse_resize_image.html
|
| @@ -0,0 +1,34 @@
|
| +<!DOCTYPE html>
|
| +<!--
|
| +Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
|
| +for details. All rights reserved. Use of this source code is governed by a
|
| +BSD-style license that can be found in the LICENSE file.
|
| +-->
|
| +
|
| +<html>
|
| + <body>
|
| + <template id="test" bind="{{ mouseMax }}" syntax="fancy">
|
| + <img src="http://www.dartlang.org/logos/dart-logo.png"
|
| + width="{{ value }}"
|
| + height="{{ value }}">
|
| + </template>
|
| + <script type="application/dart">
|
| + import 'dart:html';
|
| + import 'dart:math';
|
| + import 'package:fancy_syntax/syntax.dart';
|
| +
|
| + main() {
|
| + var globals = {
|
| + 'mouse': document.onMouseMove,
|
| + 'mouseMax':
|
| + document.onMouseMove.map((e) => max(e.offsetX, e.offsetY)),
|
| + };
|
| +
|
| + TemplateElement.syntax['fancy'] = new FancySyntax(globals: globals);
|
| +
|
| + query('#test').model = null;
|
| + }
|
| + </script>
|
| + <script src="packages/browser/dart.js"></script>
|
| + </body>
|
| +</html>
|
|
|