danoniplus 27.3.1 → 27.4.0
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/js/danoni_main.js +16 -16
- package/js/lib/danoni_constants.js +9 -1
- package/package.json +1 -1
package/js/danoni_main.js
CHANGED
|
@@ -4,12 +4,12 @@
|
|
|
4
4
|
*
|
|
5
5
|
* Source by tickle
|
|
6
6
|
* Created : 2018/10/08
|
|
7
|
-
* Revised : 2022/04/
|
|
7
|
+
* Revised : 2022/04/16
|
|
8
8
|
*
|
|
9
9
|
* https://github.com/cwtickle/danoniplus
|
|
10
10
|
*/
|
|
11
|
-
const g_version = `Ver 27.
|
|
12
|
-
const g_revisedDate = `2022/04/
|
|
11
|
+
const g_version = `Ver 27.4.0`;
|
|
12
|
+
const g_revisedDate = `2022/04/16`;
|
|
13
13
|
const g_alphaVersion = ``;
|
|
14
14
|
|
|
15
15
|
// カスタム用バージョン (danoni_custom.js 等で指定可)
|
|
@@ -910,8 +910,9 @@ const createDescDiv = (_id, _str, _altId = _id) =>
|
|
|
910
910
|
* @param {number} _y
|
|
911
911
|
* @param {number} _width
|
|
912
912
|
* @param {number} _height
|
|
913
|
+
* @param {array} _classes
|
|
913
914
|
*/
|
|
914
|
-
const createDiv = (_id, _x, _y, _width, _height) => {
|
|
915
|
+
const createDiv = (_id, _x, _y, _width, _height, _classes = []) => {
|
|
915
916
|
const div = document.createElement(`div`);
|
|
916
917
|
|
|
917
918
|
div.id = _id;
|
|
@@ -921,6 +922,7 @@ const createDiv = (_id, _x, _y, _width, _height) => {
|
|
|
921
922
|
style.width = `${_width}px`;
|
|
922
923
|
style.height = `${_height}px`;
|
|
923
924
|
style.position = `absolute`;
|
|
925
|
+
div.classList.add(..._classes);
|
|
924
926
|
setUserSelect(style);
|
|
925
927
|
|
|
926
928
|
return div;
|
|
@@ -948,8 +950,7 @@ const setUserSelect = (_style, _value = C_DIS_NONE) => {
|
|
|
948
950
|
*/
|
|
949
951
|
const createDivCss2Label = (_id, _text, { x = 0, y = 0, w = C_LEN_SETLBL_WIDTH, h = C_LEN_SETLBL_HEIGHT,
|
|
950
952
|
siz = C_SIZ_SETLBL, align = C_ALIGN_CENTER, ...rest } = {}, ..._classes) => {
|
|
951
|
-
const div = createDiv(_id, x, y, w, h);
|
|
952
|
-
div.classList.add(g_cssObj.title_base, ..._classes);
|
|
953
|
+
const div = createDiv(_id, x, y, w, h, [g_cssObj.title_base, ..._classes]);
|
|
953
954
|
|
|
954
955
|
const style = div.style;
|
|
955
956
|
style.fontSize = `${siz}px`;
|
|
@@ -1006,19 +1007,20 @@ const createColorPicker = (_parentObj, _id, _func, { x = 0, y = 0 } = {}) => {
|
|
|
1006
1007
|
const createColorObject2 = (_id,
|
|
1007
1008
|
{ x = 0, y = 0, w = C_ARW_WIDTH, h = C_ARW_WIDTH, rotate = ``, styleName = ``, ...rest } = {}, ..._classes) => {
|
|
1008
1009
|
|
|
1009
|
-
const div = createDiv(_id, x, y, w, h);
|
|
1010
|
-
div.classList.add(..._classes);
|
|
1010
|
+
const div = createDiv(_id, x, y, w, h, _classes);
|
|
1011
1011
|
const style = div.style;
|
|
1012
1012
|
|
|
1013
1013
|
// 矢印・オブジェクト判定
|
|
1014
1014
|
let charaStyle;
|
|
1015
1015
|
if (isNaN(parseFloat(rotate))) {
|
|
1016
|
-
|
|
1016
|
+
const objData = rotate.split(`:`);
|
|
1017
|
+
rotate = setVal(objData[1], 0, C_TYP_FLOAT);
|
|
1018
|
+
charaStyle = `${objData[0]}${styleName}`;
|
|
1017
1019
|
} else {
|
|
1018
1020
|
charaStyle = `arrow${styleName}`;
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
}
|
|
1021
|
+
}
|
|
1022
|
+
if (g_stateObj.rotateEnabled) {
|
|
1023
|
+
style.transform = `rotate(${rotate}deg)`;
|
|
1022
1024
|
}
|
|
1023
1025
|
|
|
1024
1026
|
style.maskImage = `url("${g_imgObj[charaStyle]}")`;
|
|
@@ -1045,8 +1047,7 @@ const createEmptySprite = (_parentObj, _newObjId, { x = 0, y = 0, w = g_sWidth,
|
|
|
1045
1047
|
changeStyle(_newObjId, { x, y, w, h, title, ...rest });
|
|
1046
1048
|
return document.getElementById(_newObjId);
|
|
1047
1049
|
}
|
|
1048
|
-
const div = createDiv(_newObjId, x, y, w, h);
|
|
1049
|
-
div.classList.add(..._classes);
|
|
1050
|
+
const div = createDiv(_newObjId, x, y, w, h, _classes);
|
|
1050
1051
|
div.title = title;
|
|
1051
1052
|
|
|
1052
1053
|
const style = div.style;
|
|
@@ -1138,8 +1139,7 @@ const createCss2Button = (_id, _text, _func = _ => true, { x = 0, y = g_sHeight
|
|
|
1138
1139
|
siz = C_LBL_BTNSIZE, align = C_ALIGN_CENTER, title = ``, groupName = g_currentPage, initDisabledFlg = true,
|
|
1139
1140
|
resetFunc = _ => true, cxtFunc = _ => true, ...rest } = {}, ..._classes) => {
|
|
1140
1141
|
|
|
1141
|
-
const div = createDiv(_id, x, y, w, h);
|
|
1142
|
-
div.classList.add(`button_common`, ..._classes);
|
|
1142
|
+
const div = createDiv(_id, x, y, w, h, [`button_common`, ..._classes]);
|
|
1143
1143
|
div.innerHTML = _text;
|
|
1144
1144
|
div.title = title;
|
|
1145
1145
|
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*
|
|
6
6
|
* Source by tickle
|
|
7
7
|
* Created : 2019/11/19
|
|
8
|
-
* Revised : 2022/04/
|
|
8
|
+
* Revised : 2022/04/16 (v27.4.0)
|
|
9
9
|
*
|
|
10
10
|
* https://github.com/cwtickle/danoniplus
|
|
11
11
|
*/
|
|
@@ -2485,11 +2485,19 @@ const g_keyObj = {
|
|
|
2485
2485
|
'Left': [1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0],
|
|
2486
2486
|
'Right': [0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1],
|
|
2487
2487
|
},
|
|
2488
|
+
assistPos9A_4: {
|
|
2489
|
+
'Left': [1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0],
|
|
2490
|
+
'Right': [0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1],
|
|
2491
|
+
},
|
|
2488
2492
|
|
|
2489
2493
|
assistPos11i_0: {
|
|
2490
2494
|
'Left': [1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0],
|
|
2491
2495
|
'Right': [0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1],
|
|
2492
2496
|
},
|
|
2497
|
+
assistPos11i_1: {
|
|
2498
|
+
'Left': [1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0],
|
|
2499
|
+
'Right': [0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1],
|
|
2500
|
+
},
|
|
2493
2501
|
|
|
2494
2502
|
assistPos17_0: {
|
|
2495
2503
|
'Left': [1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|