This file contains hidden or 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
| import { Component } from '@angular/core'; | |
| import { NavController } from 'ionic-angular'; | |
| @Component({ | |
| selector: 'page-home', | |
| templateUrl: 'home.html' | |
| }) | |
| export class HomePage { | |
| message: string = "Hi Sergey"; |
This file contains hidden or 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
| // declared vars we need: | |
| var exploding, mainSVG, layers, segment; | |
| // wrote init function, which is triggered by window.onload (below): | |
| function init() { | |
| // capture reference (cache) our main SVG element: | |
| mainSVG = document.getElementsByTagName("svg")[0]; | |
| // cache SVG element children (hopefully shapes and paths and groups) | |
| layers = mainSVG.children; | |
| // define "segment", this is used to define how far away given our SVG's viewbox our layers should distribute themselves: |
This file contains hidden or 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
| <svg> | |
| <path ... /> | |
| <path ... /> | |
| <g> | |
| <path ... /> | |
| <path ... /> | |
| <path ... /> | |
| </g> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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
| loadImageFromDevice(event) { | |
| if (!event.target.files[0]) return; | |
| let file = event.target.files[0]; | |
| //read as blob and create local object URL for it: | |
| let blobReader = new FileReader(); | |
| blobReader.readAsArrayBuffer(file); | |
| blobReader.onload = () => { | |
| let blob = new Blob([new Uint8Array((blobReader.result as ArrayBuffer))]); | |
| let blobURL = URL.createObjectURL(blob); | |
| }; |
This file contains hidden or 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
| import { Component } from '@angular/core'; | |
| import { AlertController } from '@ionic/angular'; | |
| @Component({ | |
| selector: 'app-home', | |
| templateUrl: 'home.page.html' | |
| }) | |
| export class HomePage { | |
| public colors: Array<string>; | |
| public currentColor: string; | |
| constructor(public alertController: AlertController) {} |
This file contains hidden or 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
| <ion-item> | |
| <ion-label>Hair Color</ion-label> | |
| <ion-select #mySelect [value]="currentColor" [selectedText]="currentColor" (ionChange)="selectChanged(mySelect.value)"> | |
| <ion-select-option *ngFor="let color of colors" [selected]="color === currentColor">{{ color }}</ion-select-option> | |
| </ion-select> | |
| </ion-item> |
This file contains hidden or 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
| <month-picker (monthRangeSelected)="logRange($event)"></month-picker> |
This file contains hidden or 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
| <ion-header class="ion-padding-top"> | |
| <ion-toolbar> | |
| <ion-buttons slot="start"> | |
| <ion-back-button defaultHref="/canvas"></ion-back-button> | |
| </ion-buttons> | |
| <ion-title>About</ion-title> | |
| </ion-toolbar> | |
| </ion-header> |
This file contains hidden or 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
| <ion-header> | |
| <ion-toolbar> | |
| <ion-title> | |
| Shape Generator | |
| </ion-title> | |
| </ion-toolbar> | |
| </ion-header> | |
| <svg width="100%" height="100%" viewBox="0 0 480 480" xmlns="http://www.w3.org/2000/svg" |
OlderNewer