Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: nativescript-community/ui-label
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1.0.7
Choose a base ref
...
head repository: nativescript-community/ui-label
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v1.0.8
Choose a head ref
  • 3 commits
  • 6 files changed
  • 1 contributor

Commits on Jul 12, 2019

  1. fix: ios fix

    farfromrefug committed Jul 12, 2019
    Copy the full SHA
    896aa1e View commit details
  2. test: demo update

    farfromrefug committed Jul 12, 2019
    Copy the full SHA
    24c271b View commit details
  3. v1.0.8

    farfromrefug committed Jul 12, 2019
    Copy the full SHA
    1ba91aa View commit details
Showing with 34 additions and 7 deletions.
  1. +11 −0 CHANGELOG.md
  2. +9 −1 demo-vue/app/examples/Base.vue
  3. +1 −1 lerna.json
  4. +8 −0 plugin/CHANGELOG.md
  5. +1 −1 plugin/package.json
  6. +4 −4 src/label.ios.ts
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -3,6 +3,17 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [1.0.8](https://github.com/Akylas/nativescript-label/compare/v1.0.7...v1.0.8) (2019-07-12)


### Bug Fixes

* ios fix ([896aa1e](https://github.com/Akylas/nativescript-label/commit/896aa1e))





## 1.0.7 (2019-07-12)


10 changes: 9 additions & 1 deletion demo-vue/app/examples/Base.vue
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@
<ListView :items="items">
<v-template>
<StackLayout>
<HTMLLabel fontSize="50" fontFamily="Cabin Sketch,res/cabinsketch" width="100%" paddingTop="5" color="black" textWrap="true" :html="item.text" verticalAlignment="top" />
<HTMLLabel fontSize="50" fontFamily="Cabin Sketch,res/cabinsketch" width="100%" paddingTop="5" color="black" textWrap="true" :html="item.text" verticalAlignment="top" :color="getRandomColor()" />
</StackLayout>
</v-template>
</ListView>
@@ -247,6 +247,14 @@ export default Vue.extend({
methods: {
onNavigationButtonTap() {
frameModule.topmost().goBack();
},
getRandomColor() {
var letters = '0123456789ABCDEF';
var color = '#';
for (var i = 0; i < 6; i++) {
color += letters[Math.floor(Math.random() * 16)];
}
return color;
}
},
created() {
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@
"packages": [
"plugin"
],
"version": "1.0.7",
"version": "1.0.8",
"command": {
"publish": {
"conventionalCommits": true
8 changes: 8 additions & 0 deletions plugin/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [1.0.8](https://github.com/Akylas/nativescript-label/compare/v1.0.7...v1.0.8) (2019-07-12)

**Note:** Version bump only for package nativescript-htmllabel





## 1.0.7 (2019-07-12)


2 changes: 1 addition & 1 deletion plugin/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "nativescript-htmllabel",
"version": "1.0.7",
"version": "1.0.8",
"description": "Nativescript label implementation supporting HTML",
"main": "./label",
"typings": "./label.d.ts",
8 changes: 4 additions & 4 deletions src/label.ios.ts
Original file line number Diff line number Diff line change
@@ -137,17 +137,17 @@ export class Label extends LabelBase {
fontSize = this.style.fontInternal.fontSize;
}
}
console.log('span', fontFamily, fontSize);
// console.log('span', fontFamily, fontSize);

htmlString = `<span style="font-family: ${fontFamily}}; font-size:${fontSize};">${htmlString}</span>`;
htmlString = `<span style="font-family: ${fontFamily}; font-size:${fontSize};">${htmlString}</span>`;
const nsString = NSString.stringWithString(htmlString);
console.log('updateHTMLString1', htmlString);
// console.log('updateHTMLString1', htmlString);
const nsData = nsString.dataUsingEncoding(NSUTF8StringEncoding);
const options = {
[DTDefaultTextAlignment]: kCTLeftTextAlignment,
// [NSTextSizeMultiplierDocumentOption]: 1,
// [DTIgnoreLinkStyleOption]: false,
[DTDefaultFontFamily]: fontFamily,
// [DTDefaultFontFamily]: fontFamily,
// [NSFontAttributeName]: fontFamily,
[NSTextSizeMultiplierDocumentOption]: 17 / 12.0,
[DTUseiOS6Attributes]: true,