Skip to content
This repository has been archived by the owner on Mar 13, 2018. It is now read-only.

Commit

Permalink
minor updates
Browse files Browse the repository at this point in the history
  • Loading branch information
Scott J. Miles committed Sep 3, 2013
1 parent 5d8efc1 commit c435d39
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 35 deletions.
56 changes: 28 additions & 28 deletions flatiron-director/flatiron-director.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,32 +6,32 @@
<script src="director.min.js"></script>

<polymer-element name="flatiron-director" attributes="route autoHash">
<script>
(function() {
var private_router;
Polymer('flatiron-director', {
autoHash: false,
created: function() {
this.router.on(/(\w*)/, function(route) {
this.route = route;
}.bind(this));
var initialRoute = this.router.getRoute(0);
this.route = initialRoute || '';
},
get router() {
if (!private_router) {
private_router = new Router();
private_router.init();
}
return private_router;
},
routeChanged: function() {
if (this.autoHash) {
window.location.hash = this.route;
}
this.fire('director-route', this.route);
}
});
})();
</script>
<script>
(function() {
var private_router;
Polymer('flatiron-director', {
autoHash: false,
created: function() {
this.router.on(/(\w*)/, function(route) {
this.route = route;
}.bind(this));
var initialRoute = this.router.getRoute(0);
this.route = initialRoute || '';
},
get router() {
if (!private_router) {
private_router = new Router();
private_router.init();
}
return private_router;
},
routeChanged: function() {
if (this.autoHash) {
window.location.hash = this.route;
}
this.fire('director-route', this.route);
}
});
})();
</script>
</polymer-element>
8 changes: 1 addition & 7 deletions marked-js/marked-js.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,14 @@
* {
position: relative;
display: block;
width: 300px;
height: 300px;
border: 1px solid gray;
padding: 4px;
font-family: Arial, sans-serif;
font-size: 12px;
background-color: whitesmoke;
}
}
</style>
<content></content>
</template>
<script>
Polymer('marked-js', {
allowAuthorStyles: true,
text: '',
created: function() {
this.text = this.textContent;
Expand Down
1 change: 1 addition & 0 deletions metadata.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@
<x-meta id="chart-js" label="Chart JS"></x-meta>
<x-meta id="marked-js" label="Marked"></x-meta>
<x-meta id="smoothie-chart" label="Smoothie Chart"></x-meta>
<x-meta id="flatiron-director" label="Flatiron Director"></x-meta>

0 comments on commit c435d39

Please sign in to comment.