Skip to content

Commit 246e700

Browse files
committed
Reverted previous commit as per Michiel and Ugur
1 parent cf5066e commit 246e700

File tree

3 files changed

+2
-15
lines changed

3 files changed

+2
-15
lines changed

docs/plugins/subtitles.md

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -142,11 +142,3 @@ Sets the maximum number of lines for the Subtitles text.
142142
```js
143143
Subtitles.maxLines(2)
144144
```
145-
146-
### textFormat
147-
148-
Gets the text format(fontFace, fontSize, lineHeight, textAlign, wordWrap, maxLines, textColor) of the text
149-
150-
```js
151-
Subtitles.textFormat()
152-
```

src/Subtitles/SubtitleComponent.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ export default class SubtitleComponent extends Lightning.Component {
4949
this.tag('Text').on('txLoaded', ({ _source }) => {
5050
this.w = _source.w + this.tag('Text').x * 2
5151
this.h = _source.h
52-
this.position() //TODO
52+
this.position()
5353
})
5454
}
5555

@@ -62,7 +62,6 @@ export default class SubtitleComponent extends Lightning.Component {
6262
textAlign: textTag.textAlign,
6363
wordWrap: true,
6464
maxLines: textTag.maxLines,
65-
textColor: textTag.textColor
6665
}
6766
}
6867

@@ -147,7 +146,7 @@ export default class SubtitleComponent extends Lightning.Component {
147146
}
148147

149148
set fontColor(v) {
150-
this.tag('Text').text.textColor = v
149+
this.tag('Text').color = v
151150
}
152151

153152
set backgroundColor(v) {

src/Subtitles/index.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,5 @@ export default {
101101
clear() {
102102
const subtitles = getOrCreateSubtitlesComponent()
103103
subtitles.text = ''
104-
},
105-
textFormat() {
106-
const subtitles = getOrCreateSubtitlesComponent()
107-
return subtitles.textFormat
108104
}
109105
}

0 commit comments

Comments
 (0)