seat-editor 3.2.18 → 3.2.20
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.
|
@@ -214,15 +214,15 @@ const TouchScrollDetect = () => {
|
|
|
214
214
|
]} eventMatchTable={[
|
|
215
215
|
{
|
|
216
216
|
event: "mouseenter",
|
|
217
|
-
properties: {
|
|
217
|
+
properties: { strokeWidth: 5, filter: "drop-shadow(0px 0px 5px red)" },
|
|
218
218
|
},
|
|
219
219
|
{
|
|
220
220
|
event: "dragenter",
|
|
221
|
-
properties: {
|
|
221
|
+
properties: { strokeWidth: 5 },
|
|
222
222
|
},
|
|
223
223
|
{
|
|
224
224
|
event: "selected",
|
|
225
|
-
properties: {
|
|
225
|
+
properties: { strokeWidth: 5 },
|
|
226
226
|
},
|
|
227
227
|
]} iconTags={[
|
|
228
228
|
{
|
|
@@ -3,6 +3,7 @@ import { isEmpty, omit } from "lodash";
|
|
|
3
3
|
import { arcByDirection, distributeWithSpacing } from "../layer-v3/utils";
|
|
4
4
|
import { PRIVILEGED_TAGS, tagsDummy } from "./constant";
|
|
5
5
|
import { useAppSelector } from "../../hooks/use-redux";
|
|
6
|
+
const toKebabCase = (str) => str.replace(/[A-Z]/g, (m) => "-" + m.toLowerCase());
|
|
6
7
|
const Layers = ({ components, selectedTable, iconTags, eventMatchTable, onHighlightGroup, onForceRestoreGroup, selectedTableColor, privilegedTags = [], }) => {
|
|
7
8
|
const { isShowTagType } = useAppSelector((state) => state.board);
|
|
8
9
|
const showLabels = !(["type-1", "type-2"].includes(isShowTagType)) && !iconTags;
|
|
@@ -144,6 +145,11 @@ const Layers = ({ components, selectedTable, iconTags, eventMatchTable, onHighli
|
|
|
144
145
|
eventMatchTable === null || eventMatchTable === void 0 ? void 0 : eventMatchTable.forEach((styleConfig) => {
|
|
145
146
|
if (styleConfig.event === eventType) {
|
|
146
147
|
properties = omit(styleConfig.properties || {}, "points");
|
|
148
|
+
const hasStroke = properties === null || properties === void 0 ? void 0 : properties.stroke;
|
|
149
|
+
const hasStrokeWidth = properties === null || properties === void 0 ? void 0 : properties.strokeWidth;
|
|
150
|
+
if (hasStrokeWidth && !hasStroke) {
|
|
151
|
+
properties.stroke = "#E1E3EA";
|
|
152
|
+
}
|
|
147
153
|
}
|
|
148
154
|
});
|
|
149
155
|
if (isEmpty(properties))
|
|
@@ -160,7 +166,7 @@ const Layers = ({ components, selectedTable, iconTags, eventMatchTable, onHighli
|
|
|
160
166
|
el.dataset[key] = el.getAttribute(key) || "";
|
|
161
167
|
});
|
|
162
168
|
Object.entries(properties).forEach(([key, value]) => {
|
|
163
|
-
el.setAttribute(key, value);
|
|
169
|
+
el.setAttribute(toKebabCase(key), value);
|
|
164
170
|
});
|
|
165
171
|
});
|
|
166
172
|
};
|
|
@@ -178,7 +184,7 @@ const Layers = ({ components, selectedTable, iconTags, eventMatchTable, onHighli
|
|
|
178
184
|
// bersihkan data
|
|
179
185
|
const dataset = el.dataset;
|
|
180
186
|
Object.entries(dataset).forEach(([key, value]) => {
|
|
181
|
-
el.setAttribute(key, value);
|
|
187
|
+
el.setAttribute(toKebabCase(key), value);
|
|
182
188
|
delete el.dataset[key];
|
|
183
189
|
properties = {};
|
|
184
190
|
});
|
|
@@ -195,7 +201,7 @@ const Layers = ({ components, selectedTable, iconTags, eventMatchTable, onHighli
|
|
|
195
201
|
return;
|
|
196
202
|
const dataset = el.dataset;
|
|
197
203
|
Object.entries(dataset).forEach(([key, value]) => {
|
|
198
|
-
el.setAttribute(key, value);
|
|
204
|
+
el.setAttribute(toKebabCase(key), value);
|
|
199
205
|
delete el.dataset[key];
|
|
200
206
|
properties = {};
|
|
201
207
|
});
|
package/dist/dto/table.d.ts
CHANGED
|
@@ -562,6 +562,7 @@ const LayerView = (props) => {
|
|
|
562
562
|
touchAction: "none",
|
|
563
563
|
userSelect: "none",
|
|
564
564
|
}} {...props.svgProps}>
|
|
565
|
+
|
|
565
566
|
{hasBoundingBox && (<defs>
|
|
566
567
|
<clipPath id="contentCrop">
|
|
567
568
|
<rect x={boundingBox.minX} y={boundingBox.minY} width={boundingBox.width} height={boundingBox.height}/>
|