Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import Ember from 'ember';
- export default Ember.Component.extend({
- didInsertElement() {
- this._super(...arguments);
- let canvas = this.$('.triangle')[0];
- if (canvas.getContext) {
- var ctx = canvas.getContext('2d');
- ctx.beginPath();
- ctx.moveTo(0, 0);
- ctx.lineTo(100, 0);
- ctx.lineTo(100, 100);
- ctx.lineTo(0, 0);
- ctx.fillStyle = 'seagreen';
- ctx.fill();
- ctx.font = "20pt FontAwesome";
- ctx.fillStyle = 'white';
- ctx.fillText('\uf201', 55, 43);
- }
- },
- actions: {
- handleTransition(project, event) {
- if (event.target.className === 'triangle') {
- return this.get('browseTransition')(project.id);
- }
- return this.get('projectTransition')(project.id);
- }
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement