forked from josdejong/jsoneditor
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
23 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,8 +24,8 @@ | |
* Copyright (c) 2011-2017 Jos de Jong, http://jsoneditoronline.org | ||
* | ||
* @author Jos de Jong, <[email protected]> | ||
* @version 5.8.1 | ||
* @date 2017-07-03 | ||
* @version 5.8.2 | ||
* @date 2017-07-08 | ||
*/ | ||
(function webpackUniversalModuleDefinition(root, factory) { | ||
if(typeof exports === 'object' && typeof module === 'object') | ||
|
@@ -215,7 +215,7 @@ return /******/ (function(modules) { // webpackBootstrap | |
this.options = options || {}; | ||
this.json = json || {}; | ||
|
||
var mode = this.options.mode || 'tree'; | ||
var mode = this.options.modes ? this.options.modes[0] : this.options.mode || 'tree'; | ||
this.setMode(mode); | ||
}; | ||
|
||
|
@@ -1591,7 +1591,7 @@ return /******/ (function(modules) { // webpackBootstrap | |
// Activate autocomplete | ||
setTimeout(function (hnode, element) { | ||
if (element.innerText.length > 0) { | ||
var result = this.options.autocomplete.getOptions(element.innerText, editor.get(), jsonElementType); | ||
var result = this.options.autocomplete.getOptions(element.innerText, hnode.getPath(), jsonElementType, hnode.editor); | ||
if (typeof result.then === 'function') { | ||
// probably a promise | ||
if (result.then(function (obj) { | ||
|
@@ -4486,16 +4486,6 @@ return /******/ (function(modules) { // webpackBootstrap | |
return (this.parent ? this.parent.getLevel() + 1 : 0); | ||
}; | ||
|
||
/** | ||
* Get path of the root node till the current node | ||
* @return {Node[]} Returns an array with nodes | ||
*/ | ||
Node.prototype.getNodePath = function() { | ||
var path = this.parent ? this.parent.getNodePath() : []; | ||
path.push(this); | ||
return path; | ||
}; | ||
|
||
/** | ||
* Create a clone of a node | ||
* The complete state of a clone is copied, including whether it is expanded or | ||
|
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,8 +24,8 @@ | |
* Copyright (c) 2011-2017 Jos de Jong, http://jsoneditoronline.org | ||
* | ||
* @author Jos de Jong, <[email protected]> | ||
* @version 5.8.1 | ||
* @date 2017-07-03 | ||
* @version 5.8.2 | ||
* @date 2017-07-08 | ||
*/ | ||
(function webpackUniversalModuleDefinition(root, factory) { | ||
if(typeof exports === 'object' && typeof module === 'object') | ||
|
@@ -215,7 +215,7 @@ return /******/ (function(modules) { // webpackBootstrap | |
this.options = options || {}; | ||
this.json = json || {}; | ||
|
||
var mode = this.options.mode || 'tree'; | ||
var mode = this.options.modes ? this.options.modes[0] : this.options.mode || 'tree'; | ||
this.setMode(mode); | ||
}; | ||
|
||
|
@@ -9567,7 +9567,7 @@ return /******/ (function(modules) { // webpackBootstrap | |
// Activate autocomplete | ||
setTimeout(function (hnode, element) { | ||
if (element.innerText.length > 0) { | ||
var result = this.options.autocomplete.getOptions(element.innerText, editor.get(), jsonElementType); | ||
var result = this.options.autocomplete.getOptions(element.innerText, hnode.getPath(), jsonElementType, hnode.editor); | ||
if (typeof result.then === 'function') { | ||
// probably a promise | ||
if (result.then(function (obj) { | ||
|
@@ -12462,16 +12462,6 @@ return /******/ (function(modules) { // webpackBootstrap | |
return (this.parent ? this.parent.getLevel() + 1 : 0); | ||
}; | ||
|
||
/** | ||
* Get path of the root node till the current node | ||
* @return {Node[]} Returns an array with nodes | ||
*/ | ||
Node.prototype.getNodePath = function() { | ||
var path = this.parent ? this.parent.getNodePath() : []; | ||
path.push(this); | ||
return path; | ||
}; | ||
|
||
/** | ||
* Create a clone of a node | ||
* The complete state of a clone is copied, including whether it is expanded or | ||
|
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters