pollination-react-io 1.6.0 → 1.6.1
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/build/index.esm.js +22 -0
- package/build/index.esm.js.map +1 -1
- package/build/index.js +22 -0
- package/build/index.js.map +1 -1
- package/package.json +1 -1
package/build/index.esm.js
CHANGED
|
@@ -35142,6 +35142,28 @@ var SendResults = function (_a) {
|
|
|
35142
35142
|
useEffect(function () {
|
|
35143
35143
|
setKey(defaultKey);
|
|
35144
35144
|
}, [defaultKey]);
|
|
35145
|
+
useEffect(function () {
|
|
35146
|
+
if (!sendGeometry || selOpt !== Action.subscribePreview)
|
|
35147
|
+
return;
|
|
35148
|
+
sendGeometry('SubscribeDrawResults', {
|
|
35149
|
+
data: results,
|
|
35150
|
+
uniqueId: key,
|
|
35151
|
+
options: {
|
|
35152
|
+
layer: 'StreamlitLayer',
|
|
35153
|
+
units: 'Meters',
|
|
35154
|
+
},
|
|
35155
|
+
});
|
|
35156
|
+
return function () {
|
|
35157
|
+
sendGeometry('ClearResults', {
|
|
35158
|
+
data: results,
|
|
35159
|
+
uniqueId: key,
|
|
35160
|
+
options: {
|
|
35161
|
+
layer: 'StreamlitLayer',
|
|
35162
|
+
units: 'Meters',
|
|
35163
|
+
},
|
|
35164
|
+
});
|
|
35165
|
+
};
|
|
35166
|
+
}, [key, results, selOpt, sendGeometry]);
|
|
35145
35167
|
return (React__default.createElement(SettingsButton, { disabled: !sendGeometry, onClick: function () {
|
|
35146
35168
|
if (!sendGeometry)
|
|
35147
35169
|
return;
|