fnp
/
fnpeditor.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
WIP: Refactoring canvas api - canvas, canvasNode + tests
[fnpeditor.git]
/
modules
/
rng
/
rng.js
diff --git
a/modules/rng/rng.js
b/modules/rng/rng.js
index
c83228b
..
a1fe65e
100644
(file)
--- a/
modules/rng/rng.js
+++ b/
modules/rng/rng.js
@@
-147,7
+147,7
@@
return function(sandbox) {
},
\r
restoringStarted: function(event) {
\r
sandbox.getModule('mainBar').setCommandEnabled('save', false);
\r
},
\r
restoringStarted: function(event) {
\r
sandbox.getModule('mainBar').setCommandEnabled('save', false);
\r
- sandbox.getModule('indicator').showMessage(gettext('Restoring version '
+ event.version + '...')
);
\r
+ sandbox.getModule('indicator').showMessage(gettext('Restoring version '
) + event.version + '...'
);
\r
},
\r
historyItemAdded: function(item) {
\r
sandbox.getModule('documentHistory').addHistory([item], {animate: true});
\r
},
\r
historyItemAdded: function(item) {
\r
sandbox.getModule('documentHistory').addHistory([item], {animate: true});
\r
@@
-254,11
+254,10
@@
return function(sandbox) {
sandbox.getModule('documentCanvas').toggleGrid(toggle);
\r
},
\r
newNodeRequested: function(wlxmlTag, wlxmlClass) {
\r
sandbox.getModule('documentCanvas').toggleGrid(toggle);
\r
},
\r
newNodeRequested: function(wlxmlTag, wlxmlClass) {
\r
- if(window.getSelection().isCollapsed) {
\r
sandbox.getModule('documentCanvas').insertNewNode(wlxmlTag, wlxmlClass);
\r
sandbox.getModule('documentCanvas').insertNewNode(wlxmlTag, wlxmlClass);
\r
- } else {
\r
- sandbox.getModule('documentCanvas').wrapSelectionWithNewNode(wlxmlTag, wlxmlClass);
\r
- }
\r
+ },
\r
+ command: function(cmd, meta) {
\r
+ sandbox.getModule('documentCanvas').command(cmd, meta);
\r
}
\r
};
\r
\r
}
\r
};
\r
\r