Created
June 16, 2015 02:15
-
-
Save thedeeno/145af0d85b4bdac969b9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:host { | |
display: block; | |
height: 200px; | |
margin-top: 20px; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<link rel="import" href="../polymer/polymer.html"> | |
<!-- | |
Example: | |
<timeline-knots></timeline-knots> | |
--> | |
<dom-module id="timeline-knots"> | |
<link rel="import" href="timeline-knots.css"> | |
<template> | |
<svg></svg> | |
</template> | |
</dom-module> | |
<script src="timeline-knots.js"></script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function() { | |
Polymer({ | |
is: 'timeline-knots', | |
attached: function() { | |
console.log('fails!', this.offsetHeight); | |
this.async(function() { | |
console.log('works!', this.offsetHeight); | |
}, 1); | |
}, | |
}); | |
}()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes"> | |
<title><timeline-knots> demo</title> | |
<script src="../../webcomponents.min.js"></script> | |
<link rel="import" href="timeline-knots.html"> | |
<style> | |
html { | |
height: 100%; | |
} | |
</style> | |
</head> | |
<body> | |
<timeline-knots></timeline-knots> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment