Skip to content

Commit 6833723

Browse files
committed
chore: demo cleanup
1 parent a51c0f7 commit 6833723

File tree

5 files changed

+7
-20
lines changed

5 files changed

+7
-20
lines changed

demo-snippets/canvastests.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,7 @@ import {
1515
createRect,
1616
createRectF
1717
} from '@nativescript-community/ui-canvas';
18-
import { Label, Utils } from '@nativescript/core';
19-
import { Color } from '@nativescript/core/color';
20-
import { Folder, knownFolders, path } from '@nativescript/core/file-system';
21-
import { ImageSource } from '@nativescript/core/image-source';
18+
import { Color, Folder, ImageSource, Label, Utils, knownFolders, path } from '@nativescript/core';
2219

2320
function isOnUiThread() {
2421
if (__IOS__) {

demo-snippets/vue/Animation.vue

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,10 @@
99
</template>
1010

1111
<script lang="ts">
12-
import { Frame } from '@nativescript/core/ui/frame';
12+
import { Canvas, Cap, createRectF, Paint, Style } from '@nativescript-community/ui-canvas';
13+
import { Frame } from '@nativescript/core';
1314
import Vue from 'nativescript-vue';
1415
import { Component } from 'vue-property-decorator';
15-
import { Canvas, Cap, Paint, Style, createRect, createRectF } from '@nativescript-community/ui-canvas';
16-
import { Color } from '@nativescript/core/color';
17-
import { Screen } from '@nativescript/core/platform';
1816
1917
import TWEEN from '@nativescript-community/tween';
2018

demo-snippets/vue/CanvasLabel.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
</template>
2727

2828
<script lang="ts">
29-
import { stringify } from 'querystring';
3029
const icons = [
3130
'mdi-numeric',
3231
'mdi-hat-fedora',

demo-snippets/vue/Complex.vue

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,7 @@
1616
<script lang="ts">
1717
import * as perms from '@nativescript-community/perms';
1818
import { Canvas } from '@nativescript-community/ui-canvas';
19-
import * as app from '@nativescript/core/application';
20-
import { ImageSource } from '@nativescript/core/image-source';
21-
import { Frame } from '@nativescript/core/ui/frame';
22-
import { Image } from '@nativescript/core/ui/image';
19+
import { Application, Frame, Image, ImageSource } from '@nativescript/core';
2320
import Vue from 'nativescript-vue';
2421
import { Component } from 'vue-property-decorator';
2522
import { drawOnImage } from '../canvastests';
@@ -99,7 +96,7 @@ export default class ComplexExample extends Vue {
9996
// if (callBack) callBack();
10097
// return result;
10198
} else {
102-
const context = app.android.context;
99+
const context = Application.android.context;
103100
android.provider.MediaStore.Images.Media.insertImage(context.getContentResolver(), imageSource.android, 'test_' + Date.now() + '.png', Date.now() + '');
104101
}
105102
});

demo-snippets/vue/Image.vue

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,10 @@
99
</template>
1010

1111
<script lang="ts">
12-
import { Frame } from '@nativescript/core/ui/frame';
12+
import { createRect } from '@nativescript-community/ui-canvas';
13+
import { Frame, ImageSource, knownFolders, path } from '@nativescript/core';
1314
import Vue from 'nativescript-vue';
1415
import { Component } from 'vue-property-decorator';
15-
import { Paint, Style, createRect } from '@nativescript-community/ui-canvas';
16-
import { Color } from '@nativescript/core/color';
17-
import { Folder, knownFolders, path } from '@nativescript/core/file-system';
18-
import { ImageSource } from '@nativescript/core/image-source';
19-
import { Screen } from '@nativescript/core/platform';
2016
2117
const iconLocalFile: ImageSource = ImageSource.fromFileSync(path.join(knownFolders.currentApp().path, 'assets/images/test.jpg'));
2218

0 commit comments

Comments
 (0)