dphelper 0.0.8 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/scripts/{loadAsset.js → .OLD/loadAsset.js} +0 -0
- package/scripts/anchorToOnClick.js +1 -1
- package/scripts/arrayItemFinder.js +1 -1
- package/scripts/arrayMerge.js +1 -1
- package/scripts/disableSelect.js +24 -22
- package/scripts/printInfo.js +1 -1
- package/scripts/randomNum.js +1 -1
- package/scripts/randomNumTmr.js +1 -1
- package/scripts/serializeObj.js +2 -2
- package/scripts/svgSupport.js +5 -5
package/package.json
CHANGED
|
File without changes
|
|
@@ -23,7 +23,7 @@ dphelper.anchorToOnClick = function(){
|
|
|
23
23
|
Loader( 'body' , null );
|
|
24
24
|
})
|
|
25
25
|
.css('cursor','pointer')
|
|
26
|
-
.addClass(
|
|
26
|
+
.addClass( dphelper.pathRail()[3].replace(/\//g, '') )
|
|
27
27
|
.removeAttr( 'href' )
|
|
28
28
|
.on( 'click', function(){
|
|
29
29
|
window.location.href = href;
|
|
@@ -14,7 +14,7 @@ dphelper.arrayItemFinder = (id, array) => {
|
|
|
14
14
|
if (node.id === id) return node;
|
|
15
15
|
|
|
16
16
|
if (node.children) {
|
|
17
|
-
let finalNode =
|
|
17
|
+
let finalNode = dphelper.arrayFindItem(id, node.children);
|
|
18
18
|
if (finalNode) return finalNode;
|
|
19
19
|
}
|
|
20
20
|
}
|
package/scripts/arrayMerge.js
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
dphelper.arrayMerge = (target, source) => {
|
|
13
13
|
|
|
14
14
|
for (const key of Object.keys(source)) {
|
|
15
|
-
if (source[key] instanceof Object && target[key]) Object.assign(source[key],
|
|
15
|
+
if (source[key] instanceof Object && target[key]) Object.assign(source[key], dphelper.mergeArrays(target[key], source[key]));
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
Object.assign(target || {}, source);
|
package/scripts/disableSelect.js
CHANGED
|
@@ -11,31 +11,33 @@
|
|
|
11
11
|
|
|
12
12
|
dphelper.disableSelect = function( e ){
|
|
13
13
|
|
|
14
|
-
const
|
|
14
|
+
const disabling = ( e ) => {
|
|
15
|
+
|
|
16
|
+
const $ = require("jquery");
|
|
15
17
|
|
|
16
|
-
|
|
18
|
+
$( 'body' ).each( function(){
|
|
17
19
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
20
|
+
$( this )
|
|
21
|
+
.prop( "unselectable" , "on" )
|
|
22
|
+
.css( "MozUserSelect" , "none" )
|
|
23
|
+
.css( "WebKitUserSelect" , "none" )
|
|
24
|
+
.on( "select" , function(){ return false; })
|
|
25
|
+
.on( "selectstart" , function(){ return false; });
|
|
24
26
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
+
//this.onselectstart = function() { return false }
|
|
28
|
+
//this.oncontextmenu = function() { return false }
|
|
27
29
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
});
|
|
30
|
+
$( 'img, a, input, button' ).on( 'dragstart' , function( e ) {
|
|
31
|
+
e.preventDefault();
|
|
32
|
+
return false;
|
|
33
|
+
});
|
|
34
34
|
|
|
35
|
-
};
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
document.body.addEventListener('mousedown',function( e ){ disabling( e ); }, false );
|
|
40
|
+
document.body.onmousedown = function( e ){ disabling( e ); };
|
|
41
|
+
console.debug("%cSelection Disabled:%c true", "color:gray", "");
|
|
36
42
|
|
|
37
|
-
|
|
38
|
-
document.body.addEventListener('mousedown',function( e ){ DisableSelect(); }, false );
|
|
39
|
-
document.body.onmousedown = function( e ){ DisableSelect( e ); };
|
|
40
|
-
console.debug("%cSelection Disabled:%c " + wng.selectionDisabled, "color:gray", "");
|
|
41
|
-
}
|
|
43
|
+
};
|
package/scripts/printInfo.js
CHANGED
package/scripts/randomNum.js
CHANGED
package/scripts/randomNumTmr.js
CHANGED
package/scripts/serializeObj.js
CHANGED
|
@@ -19,7 +19,7 @@ dphelper.objSerialize = (value) => {
|
|
|
19
19
|
let serializeObject = {};
|
|
20
20
|
for (const [objectKey, objectValue] of Object.entries(value)) {
|
|
21
21
|
console.info( `objectKey=${objectKey} value=${objectValue}` );
|
|
22
|
-
serializeObject[objectKey] =
|
|
22
|
+
serializeObject[objectKey] = dphelper.objSerialize(objectValue);
|
|
23
23
|
}
|
|
24
24
|
return serializeObject;
|
|
25
25
|
}
|
|
@@ -38,7 +38,7 @@ dphelper.objDeSerialize = (valueNew) => {
|
|
|
38
38
|
let deserializeObject = {};
|
|
39
39
|
for (const [objectKey, objectValue] of Object.entries(valueNew)) {
|
|
40
40
|
console.info( `objectKey=${objectKey} value=${objectValue}` );
|
|
41
|
-
deserializeObject[objectKey] =
|
|
41
|
+
deserializeObject[objectKey] = dphelper.objDeSerialize(objectValue);
|
|
42
42
|
}
|
|
43
43
|
return deserializeObject;
|
|
44
44
|
}
|
package/scripts/svgSupport.js
CHANGED
|
@@ -11,19 +11,19 @@
|
|
|
11
11
|
|
|
12
12
|
dphelper.supportsVml = function () {
|
|
13
13
|
|
|
14
|
-
if ( typeof supportsVml.supported == "undefined" ) {
|
|
14
|
+
if ( typeof dphelper.supportsVml.supported == "undefined" ) {
|
|
15
15
|
|
|
16
16
|
let a = document.body.appendChild( document.createElement( 'div' ) );
|
|
17
17
|
a.innerHTML = '<v:shape id="vml_flag1" adj="1" />';
|
|
18
18
|
|
|
19
19
|
let b = a.firstChild;
|
|
20
20
|
b.style.behavior = "url(#default#VML)";
|
|
21
|
-
supportsVml.supported = b ? typeof b.adj == "object" : true;
|
|
21
|
+
dphelper.supportsVml.supported = b ? typeof b.adj == "object" : true;
|
|
22
22
|
a.parentNode.removeChild( a );
|
|
23
23
|
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
-
return supportsVml.supported;
|
|
26
|
+
return dphelper.supportsVml.supported;
|
|
27
27
|
|
|
28
28
|
};
|
|
29
29
|
|
|
@@ -314,7 +314,7 @@ dphelper.handleSvgToggle = function( evt , container , source1 , source2 ) {
|
|
|
314
314
|
|
|
315
315
|
if( $( evt.target ).prop( 'checked' ) && $( source1 ).length && $( source2 ).length ) {
|
|
316
316
|
|
|
317
|
-
|
|
317
|
+
dphelper.storeCookie.set( $( evt.target ).attr( 'id' ), 1, 365 );
|
|
318
318
|
|
|
319
319
|
initConnection( container[0], [ $( source1 )[0], 'right' ], [ $( source2 )[0], 'left' ], function( source1 , source2 ) {
|
|
320
320
|
|
|
@@ -329,7 +329,7 @@ dphelper.handleSvgToggle = function( evt , container , source1 , source2 ) {
|
|
|
329
329
|
|
|
330
330
|
dphelper.removeConnection( container );
|
|
331
331
|
$( '#parts-left-body' ).unbind( 'scroll' );
|
|
332
|
-
|
|
332
|
+
dphelper.storeCookie.set( $( evt.target ).attr( 'id' ), 0, 365 );
|
|
333
333
|
|
|
334
334
|
}
|
|
335
335
|
|