DEV: global s/this.get\("(\w+)"\)/this.$1 (#7592)

This commit is contained in:
Joffrey JAFFEUX
2019-05-27 10:15:39 +02:00
committed by GitHub
parent 170c66c190
commit bfea922167
389 changed files with 2448 additions and 2460 deletions

View File

@ -10,7 +10,7 @@ export default Ember.Component.extend({
@observes("editorId")
editorIdChanged() {
if (this.get("autofocus")) {
if (this.autofocus) {
this.send("focus");
}
},
@ -18,14 +18,14 @@ export default Ember.Component.extend({
@observes("content")
contentChanged() {
if (this._editor && !this._skipContentChangeEvent) {
this._editor.getSession().setValue(this.get("content"));
this._editor.getSession().setValue(this.content);
}
},
@observes("mode")
modeChanged() {
if (this._editor && !this._skipContentChangeEvent) {
this._editor.getSession().setMode("ace/mode/" + this.get("mode"));
this._editor.getSession().setMode("ace/mode/" + this.mode);
}
},
@ -37,7 +37,7 @@ export default Ember.Component.extend({
changeDisabledState() {
const editor = this._editor;
if (editor) {
const disabled = this.get("disabled");
const disabled = this.disabled;
editor.setOptions({
readOnly: disabled,
highlightActiveLine: !disabled,
@ -79,7 +79,7 @@ export default Ember.Component.extend({
editor.setTheme("ace/theme/chrome");
editor.setShowPrintMargin(false);
editor.setOptions({ fontSize: "14px" });
editor.getSession().setMode("ace/mode/" + this.get("mode"));
editor.getSession().setMode("ace/mode/" + this.mode);
editor.on("change", () => {
this._skipContentChangeEvent = true;
this.set("content", editor.getSession().getValue());
@ -103,7 +103,7 @@ export default Ember.Component.extend({
this.appEvents.on("ace:resize", this, "resize");
}
if (this.get("autofocus")) {
if (this.autofocus) {
this.send("focus");
}
});