Skip to content

Commit a5b1b22

Browse files
committed
test: demo update
1 parent b9dcdda commit a5b1b22

File tree

4 files changed

+21
-18
lines changed

4 files changed

+21
-18
lines changed

Diff for: demo-vue/app/App_Resources/iOS/Podfile

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
platform :ios, '10.0'
2+
post_install do |installer|
3+
installer.pods_project.targets.each do |target|
4+
target.build_configurations.each do |config|
5+
config.build_settings.delete 'IPHONEOS_DEPLOYMENT_TARGET'
6+
end
7+
end
8+
end

Diff for: demo-vue/app/canvastests.ts

-3
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ const folder: Folder = knownFolders.currentApp();
1515
const iconLocalFile: ImageSource = ImageSource.fromFileSync(path.join(folder.path, 'images/test.jpg'));
1616

1717
export function drawOnImage(scale = 3, canvas?: Canvas) {
18-
1918
if (!canvas) {
2019
const folderPath: string = path.join(folder.path, 'images/test.jpg');
2120
const imageFromLocalFile: ImageSource = ImageSource.fromFileSync(folderPath);
@@ -187,10 +186,8 @@ export function drawOnImage(scale = 3, canvas?: Canvas) {
187186
canvas.save();
188187
canvas.translate(30, 200);
189188
const fontMetrics = textPaint.getFontMetrics();
190-
console.log('fontMetrics', fontMetrics.descent - fontMetrics.ascent, fontMetrics.ascent, fontMetrics.bottom, fontMetrics.descent, fontMetrics.leading, fontMetrics.top);
191189
const rect = new Rect(0, 0, 0, 0);
192190
textPaint.getTextBounds('A', 0, 1, rect);
193-
console.log('textBounds', rect.top, rect.left, rect.width(), rect.height());
194191
canvas.drawRect(rect, bgPaint);
195192
canvas.drawText('A', 0, 0, textPaint);
196193

Diff for: demo-vue/package.json

+11-11
Original file line numberDiff line numberDiff line change
@@ -6,24 +6,24 @@
66
"repository": "http://www.github.com/Akylas/@nativescript-community/ui-canvas.git",
77
"main": "main",
88
"dependencies": {
9-
"@nativescript/core": "7.0.13",
10-
"@nativescript-community/perms": "2.1.1",
9+
"@nativescript/core": "7.2.1",
10+
"@nativescript-community/perms": "2.1.5",
1111
"@nativescript-community/ui-canvas": "file:../plugin",
12-
"@nativescript-community/ui-material-core": "5.0.30",
13-
"@nativescript/webpack": "3.0.8",
14-
"@nativescript-community/tween": "0.0.12",
15-
"nativescript-vue": "^2.8.1"
12+
"@nativescript-community/ui-material-core": "5.2.8",
13+
"@nativescript-community/tween": "0.0.14",
14+
"nativescript-vue": "^2.8.3"
1615
},
1716
"devDependencies": {
1817
"@babel/core": "^7.12.3",
1918
"@nativescript/android": "7.0.1",
20-
"@nativescript/types": "7.0.4",
21-
"babel-loader": "^8.1.0",
22-
"nativescript-vue-template-compiler": "2.8.1",
23-
"tns-ios": "6.5.3",
19+
"@nativescript/types": "7.2.0",
20+
"@nativescript/webpack": "4.1.0",
21+
"babel-loader": "^8.2.2",
22+
"nativescript-vue-template-compiler": "2.8.3",
23+
"tns-ios": "6.5.4",
2424
"typescript": "^3.9.7",
2525
"vue": "^2.6.12",
2626
"vue-loader": "^15.9.3",
2727
"vue-property-decorator": "^8.5.1"
2828
}
29-
}
29+
}

Diff for: demo-vue/webpack.config.js

+2-4
Original file line numberDiff line numberDiff line change
@@ -301,13 +301,11 @@ module.exports = env => {
301301
verbose: !!verbose
302302
}),
303303
// Copy assets
304-
new CopyWebpackPlugin({
305-
patterns: [
304+
new CopyWebpackPlugin( [
306305
{ from: 'assets/**', noErrorOnMissing: true, globOptions: { dot: false, ...copyIgnore } },
307306
{ from: 'fonts/**', noErrorOnMissing: true, globOptions: { dot: false, ...copyIgnore } },
308307
{ from: '**/*.+(jpg|png)', noErrorOnMissing: true, globOptions: { dot: false, ...copyIgnore } }
309-
],
310-
}),
308+
]),
311309
new nsWebpack.GenerateNativeScriptEntryPointsPlugin("bundle"),
312310
// For instructions on how to set up workers with webpack
313311
// check out https://github.com/nativescript/worker-loader

0 commit comments

Comments
 (0)