Skip to content

Commit

Permalink
3.3.13
Browse files Browse the repository at this point in the history
  • Loading branch information
vakata committed Jan 16, 2023
1 parent d3c7d94 commit 55c043a
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 11 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "jstree",
"license": "MIT",
"version": "3.3.12",
"version": "3.3.13",
"main" : [
"./dist/jstree.js",
"./dist/themes/default/style.css"
Expand Down
2 changes: 1 addition & 1 deletion component.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "jstree",
"repo": "vakata/jstree",
"description": "jsTree is jquery plugin, that provides interactive trees.",
"version": "3.3.12",
"version": "3.3.13",
"license": "MIT",
"keywords": [
"ui",
Expand Down
17 changes: 12 additions & 5 deletions dist/jstree.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
}(function ($, undefined) {
"use strict";
/*!
* jsTree 3.3.12
* jsTree 3.3.13
* http://jstree.com/
*
* Copyright (c) 2014 Ivan Bozhanov (http://vakata.com)
Expand Down Expand Up @@ -63,7 +63,7 @@
* specifies the jstree version in use
* @name $.jstree.version
*/
version : '3.3.12',
version : '3.3.13',
/**
* holds all the default options used when creating new instances
* @name $.jstree.defaults
Expand Down Expand Up @@ -6804,7 +6804,13 @@
* @name $.jstree.defaults.dnd.use_html5
* @plugin dnd
*/
use_html5: false
use_html5: false,
/**
* controls whether items can be dropped anywhere on the tree.
* @name $.jstree.defaults.dnd.blank_space_drop
* @plugin dnd
*/
blank_space_drop: false
};
var drg, elm;
// TODO: now check works by checking for each node individually, how about max_children, unique, etc?
Expand Down Expand Up @@ -6941,7 +6947,7 @@

// if are hovering the container itself add a new root node
//console.log(data.event);
if( (data.event.target === ins.element[0] || data.event.target === ins.get_container_ul()[0]) && ins.get_container_ul().children().length === 0) {
if( (data.event.target === ins.element[0] || data.event.target === ins.get_container_ul()[0]) && (ins.get_container_ul().children().length === 0 || ins.settings.dnd.blank_space_drop)) {
ok = true;
for(t1 = 0, t2 = data.data.nodes.length; t1 < t2; t1++) {
ok = ok && ins.check( (data.data.origin && (data.data.origin.settings.dnd.always_copy || (data.data.origin.settings.dnd.copy && (data.event.metaKey || data.event.ctrlKey)) ) ? "copy_node" : "move_node"), (data.data.origin && data.data.origin !== ins ? data.data.origin.get_node(data.data.nodes[t1]) : data.data.nodes[t1]), $.jstree.root, 'last', { 'dnd' : true, 'ref' : ins.get_node($.jstree.root), 'pos' : 'i', 'origin' : data.data.origin, 'is_multi' : (data.data.origin && data.data.origin !== ins), 'is_foreign' : (!data.data.origin) });
Expand All @@ -6960,6 +6966,7 @@
else {
// if we are hovering a tree node
ref = ins.settings.dnd.large_drop_target ? $(data.event.target).closest('.jstree-node').children('.jstree-anchor') : $(data.event.target).closest('.jstree-anchor');

if(ref && ref.length && ref.parent().is('.jstree-closed, .jstree-open, .jstree-leaf')) {
off = ref.offset();
rel = (data.event.pageY !== undefined ? data.event.pageY : data.event.originalEvent.pageY) - off.top;
Expand Down Expand Up @@ -7290,7 +7297,7 @@
vakata_dnd.scroll_e = false;
$($(e.target).parentsUntil("body").addBack().get().reverse())
.filter(function () {
return (/^auto|scroll$/).test($(this).css("overflow")) &&
return this.ownerDocument && (/^auto|scroll$/).test($(this).css("overflow")) &&
(this.scrollHeight > this.offsetHeight || this.scrollWidth > this.offsetWidth);
})
.each(function () {
Expand Down
4 changes: 2 additions & 2 deletions dist/jstree.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion jstree.jquery.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "jstree",
"title": "jsTree",
"description": "Tree view for jQuery",
"version": "3.3.12",
"version": "3.3.13",
"homepage": "http://jstree.com",
"keywords": [
"ui",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "jstree",
"title": "jsTree",
"description": "jQuery tree plugin",
"version": "3.3.12",
"version": "3.3.13",
"homepage": "http://jstree.com",
"main": "./dist/jstree.js",
"author": {
Expand Down

0 comments on commit 55c043a

Please sign in to comment.