mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-08-06 22:04:19 +00:00
Keeping JSHint happy
This commit is contained in:
parent
4eef87ec36
commit
ff823ff302
@ -17,7 +17,7 @@ function BitmapEditor(macroNode) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
BitmapEditor.prototype.getContent = function() {
|
BitmapEditor.prototype.getContent = function() {
|
||||||
return [Renderer.ElementNode("canvas",{},[])]
|
return [Renderer.ElementNode("canvas",{},[])];
|
||||||
};
|
};
|
||||||
|
|
||||||
BitmapEditor.prototype.renderInDom = function() {
|
BitmapEditor.prototype.renderInDom = function() {
|
||||||
@ -85,7 +85,7 @@ BitmapEditor.prototype.saveChanges = function() {
|
|||||||
BitmapEditor.prototype.isRefreshable = function() {
|
BitmapEditor.prototype.isRefreshable = function() {
|
||||||
// Don't ever refresh the bitmap editor
|
// Don't ever refresh the bitmap editor
|
||||||
return false;
|
return false;
|
||||||
}
|
};
|
||||||
|
|
||||||
function TextEditor(macroNode) {
|
function TextEditor(macroNode) {
|
||||||
this.macroNode = macroNode;
|
this.macroNode = macroNode;
|
||||||
@ -163,7 +163,7 @@ TextEditor.prototype.handleEvent = function(event) {
|
|||||||
TextEditor.prototype.isRefreshable = function() {
|
TextEditor.prototype.isRefreshable = function() {
|
||||||
// Don't refresh the editor if it contains the caret or selection
|
// Don't refresh the editor if it contains the caret or selection
|
||||||
return !window.getSelection().containsNode(this.macroNode.domNode, true);
|
return !window.getSelection().containsNode(this.macroNode.domNode, true);
|
||||||
}
|
};
|
||||||
|
|
||||||
exports.macro = {
|
exports.macro = {
|
||||||
name: "edit",
|
name: "edit",
|
||||||
@ -175,13 +175,13 @@ exports.macro = {
|
|||||||
// Get the tiddler being editted
|
// Get the tiddler being editted
|
||||||
var tiddler = this.store.getTiddler(this.tiddlerTitle);
|
var tiddler = this.store.getTiddler(this.tiddlerTitle);
|
||||||
// Figure out which editor to use
|
// Figure out which editor to use
|
||||||
var editor = TextEditor;
|
var Editor = TextEditor;
|
||||||
if(this.params.field === "text") {
|
if(this.params.field === "text") {
|
||||||
if(["image/jpg","image/jpeg","image/png","image/gif"].indexOf(tiddler.type) !== -1) {
|
if(["image/jpg","image/jpeg","image/png","image/gif"].indexOf(tiddler.type) !== -1) {
|
||||||
editor = BitmapEditor;
|
Editor = BitmapEditor;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.editor = new editor(this);
|
this.editor = new Editor(this);
|
||||||
var content = this.editor.getContent();
|
var content = this.editor.getContent();
|
||||||
for(var t=0; t<content.length; t++) {
|
for(var t=0; t<content.length; t++) {
|
||||||
content[t].execute(this.parents,this.tiddlerTitle);
|
content[t].execute(this.parents,this.tiddlerTitle);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user