Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(14)

Unified Diff: elements/designer-selection/demo.html

Issue 877243005: Add designer-selection element (Closed) Base URL: https://github.com/PolymerLabs/designer2.git@master
Patch Set: Address more review comments Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « elements/designer-selection/ResizeDirection.js ('k') | elements/designer-selection/designer-selection.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: elements/designer-selection/demo.html
diff --git a/elements/designer-selection/demo.html b/elements/designer-selection/demo.html
new file mode 100644
index 0000000000000000000000000000000000000000..5965bcfec8b2a0fd8f40a700177984af641ad662
--- /dev/null
+++ b/elements/designer-selection/demo.html
@@ -0,0 +1,28 @@
+<html>
+ <head>
+ <link rel="import" href="designer-selection.html">
+ <style>
+ designer-selection {
+ position: absolute;
+ top: 100px;
+ left: 100px;
+ width: 200px;
+ height: 200px;
+ }
+ </style>
+ </head>
+ <body>
+ <designer-selection></designer-selection>
+ <script>
+ var selection = document.querySelector('designer-selection');
+ selection.addEventListener('designer-selection-resize', function(event) {
+ var detail = event.detail;
+ var style = selection.style;
+ style.left = detail.left;
+ style.top = detail.top;
+ style.width = detail.width;
+ style.height = detail.height;
+ });
+ </script>
+ </body>
+</html>
« no previous file with comments | « elements/designer-selection/ResizeDirection.js ('k') | elements/designer-selection/designer-selection.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698