poi-plugin-kai-planner 1.0.7 → 1.0.8
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
CHANGED
|
@@ -1,30 +1,49 @@
|
|
|
1
|
-
/* src/app/components/SlotitemTypeIcon.js */
|
|
2
|
-
|
|
3
|
-
const React = require("react");
|
|
4
|
-
|
|
5
|
-
let SlotitemIcon = null;
|
|
6
|
-
try {
|
|
7
|
-
({ SlotitemIcon } = require("views/components/etc/icon"));
|
|
8
|
-
} catch {}
|
|
9
|
-
|
|
10
|
-
function SlotitemTypeIcon({ iconType, title, style }) {
|
|
11
|
-
if (!iconType || !SlotitemIcon) return null;
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
1
|
+
/* src/app/components/SlotitemTypeIcon.js */
|
|
2
|
+
|
|
3
|
+
const React = require("react");
|
|
4
|
+
|
|
5
|
+
let SlotitemIcon = null;
|
|
6
|
+
try {
|
|
7
|
+
({ SlotitemIcon } = require("views/components/etc/icon"));
|
|
8
|
+
} catch {}
|
|
9
|
+
|
|
10
|
+
function SlotitemTypeIcon({ iconType, title, style }) {
|
|
11
|
+
if (!iconType || !SlotitemIcon) return null;
|
|
12
|
+
const baseSize = 20;
|
|
13
|
+
const width = style && Number.isFinite(style.width) ? style.width : baseSize;
|
|
14
|
+
const height = style && Number.isFinite(style.height) ? style.height : baseSize;
|
|
15
|
+
const scale = Math.min(width / baseSize, height / baseSize);
|
|
16
|
+
|
|
17
|
+
return React.createElement(
|
|
18
|
+
"span",
|
|
19
|
+
{
|
|
20
|
+
title: title || "",
|
|
21
|
+
style: {
|
|
22
|
+
display: "inline-flex",
|
|
23
|
+
alignItems: "center",
|
|
24
|
+
justifyContent: "center",
|
|
25
|
+
width,
|
|
26
|
+
height,
|
|
27
|
+
flexShrink: 0,
|
|
28
|
+
lineHeight: 0,
|
|
29
|
+
...(style || {}),
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
React.createElement(
|
|
33
|
+
"span",
|
|
34
|
+
{
|
|
35
|
+
style: {
|
|
36
|
+
display: "inline-flex",
|
|
37
|
+
alignItems: "center",
|
|
38
|
+
justifyContent: "center",
|
|
39
|
+
width: baseSize,
|
|
40
|
+
height: baseSize,
|
|
41
|
+
zoom: scale,
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
React.createElement(SlotitemIcon, { slotitemId: iconType })
|
|
45
|
+
)
|
|
46
|
+
);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
module.exports = { SlotitemTypeIcon };
|
|
@@ -424,7 +424,7 @@ class DailyTab extends React.Component {
|
|
|
424
424
|
},
|
|
425
425
|
foldIcon
|
|
426
426
|
),
|
|
427
|
-
React.createElement(SlotitemTypeIcon, { iconType: r.iconType, title: r.equipTypeName, style: { width:
|
|
427
|
+
React.createElement(SlotitemTypeIcon, { iconType: r.iconType, title: r.equipTypeName, style: { width: 14, height: 14 } }),
|
|
428
428
|
React.createElement(
|
|
429
429
|
"div",
|
|
430
430
|
null,
|
|
@@ -132,7 +132,7 @@ function WishlistTable({
|
|
|
132
132
|
React.createElement(SlotitemTypeIcon, {
|
|
133
133
|
iconType: rowVm.targetIconType,
|
|
134
134
|
title: rowVm.targetEquipTypeName,
|
|
135
|
-
style: { width:
|
|
135
|
+
style: { width: 14, height: 14 },
|
|
136
136
|
}),
|
|
137
137
|
React.createElement(
|
|
138
138
|
"div",
|