X-Git-Url: https://gerrit.onap.org/r/gitweb?p=ccsdk%2Fdistribution.git;a=blobdiff_plain;f=dgbuilder%2Fpublic%2Fred%2Fui%2Flibrary.js;h=10c992615d6b13bf75b3bb3ef8d0ceda87870545;hp=0c803bf0b78a2b3b45e0f36355f586d16e8c3084;hb=8f6a6c445eaeb7356e1db9d10d10b7d3fa42f27e;hpb=6741df81b766bb1dc271c214b923b18f52c20892 diff --git a/dgbuilder/public/red/ui/library.js b/dgbuilder/public/red/ui/library.js index 0c803bf0..10c99261 100644 --- a/dgbuilder/public/red/ui/library.js +++ b/dgbuilder/public/red/ui/library.js @@ -74,7 +74,19 @@ RED.library = (function() { var libraryData = {}; var selectedLibraryItem = null; var libraryEditor = null; - + // Orion editor has set/getText + // ACE editor has set/getValue + // normalise to set/getValue + if (options.editor.setText) { + // Orion doesn't like having pos passed in, so proxy the call to drop it + options.editor.setValue = function(text,pos) { + options.editor.setText.call(options.editor,text); + } + } + if (options.editor.getText) { + options.editor.getValue = options.editor.getText; + } + function buildFileListItem(item) { var li = document.createElement("li"); li.onmouseover = function(e) { $(this).addClass("list-hover"); };