Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/streamlit_plotly_events.egg-info/SOURCES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ src/streamlit_plotly_events.egg-info/requires.txt
src/streamlit_plotly_events.egg-info/top_level.txt
src/streamlit_plotly_events/frontend/build/asset-manifest.json
src/streamlit_plotly_events/frontend/build/index.html
src/streamlit_plotly_events/frontend/build/precache-manifest.ee925ac68621088b518d13d45367f5fb.js
src/streamlit_plotly_events/frontend/build/precache-manifest.b35d89159f39b2f6b144595f6317bcdd.js
src/streamlit_plotly_events/frontend/build/service-worker.js
src/streamlit_plotly_events/frontend/build/static/js/2.9330ddf9.chunk.js
src/streamlit_plotly_events/frontend/build/static/js/2.9330ddf9.chunk.js.LICENSE.txt
src/streamlit_plotly_events/frontend/build/static/js/2.9330ddf9.chunk.js.map
src/streamlit_plotly_events/frontend/build/static/js/main.45b4700a.chunk.js
src/streamlit_plotly_events/frontend/build/static/js/main.45b4700a.chunk.js.map
src/streamlit_plotly_events/frontend/build/static/js/main.47564b5d.chunk.js
src/streamlit_plotly_events/frontend/build/static/js/main.47564b5d.chunk.js.map
src/streamlit_plotly_events/frontend/build/static/js/runtime-main.44d30fc2.js
src/streamlit_plotly_events/frontend/build/static/js/runtime-main.44d30fc2.js.map
11 changes: 11 additions & 0 deletions src/streamlit_plotly_events/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ def plotly_events(
clicked_point_size: float = 0.0,
measure_mode: bool = False,
measure_line_width: float = 4.0,
get_relayout: bool = False,
):
"""Create a new instance of "plotly_events".

Expand Down Expand Up @@ -129,6 +130,15 @@ def plotly_events(
dxz: (delta xz of measurement points, 0 when only one point is clicked),
dyz: (delta yz of measurement points, 0 when only one point is clicked)
}
If get_relayout is enabled, additional returns will happen when the chart is moved around
{
cameraLayout: {
x: float (x camera position)
y: float (y camera position)
z: float (z camera position)
}
}
different dictionaries will be returned so you need to handle them

"""
# kwargs will be exposed to frontend in "args"
Expand All @@ -146,6 +156,7 @@ def plotly_events(
clicked_point_size=clicked_point_size,
measure_mode=measure_mode,
measure_line_width=measure_line_width,
get_relayout=get_relayout
)

# Parse component_value since it's JSON and return to Streamlit
Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
{
"files": {
"main.js": "./static/js/main.9ae4b44f.chunk.js",
"main.js.map": "./static/js/main.9ae4b44f.chunk.js.map",
"main.js": "./static/js/main.1a76c4f6.chunk.js",
"main.js.map": "./static/js/main.1a76c4f6.chunk.js.map",
"runtime-main.js": "./static/js/runtime-main.44d30fc2.js",
"runtime-main.js.map": "./static/js/runtime-main.44d30fc2.js.map",
"static/js/2.9330ddf9.chunk.js": "./static/js/2.9330ddf9.chunk.js",
"static/js/2.9330ddf9.chunk.js.map": "./static/js/2.9330ddf9.chunk.js.map",
"index.html": "./index.html",
"precache-manifest.3ad9568572eeefd3802f3ee4a74284a7.js": "./precache-manifest.3ad9568572eeefd3802f3ee4a74284a7.js",
"precache-manifest.ca90bb69d909fe1f7175ebdd0dbb5e85.js": "./precache-manifest.ca90bb69d909fe1f7175ebdd0dbb5e85.js",
"service-worker.js": "./service-worker.js",
"static/js/2.9330ddf9.chunk.js.LICENSE.txt": "./static/js/2.9330ddf9.chunk.js.LICENSE.txt"
},
"entrypoints": [
"static/js/runtime-main.44d30fc2.js",
"static/js/2.9330ddf9.chunk.js",
"static/js/main.9ae4b44f.chunk.js"
"static/js/main.1a76c4f6.chunk.js"
]
}
2 changes: 1 addition & 1 deletion src/streamlit_plotly_events/frontend/build/index.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<!doctype html><html lang="en"><head><title>Streamlit Component</title><meta charset="UTF-8"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="Streamlit Component"/></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div><script>!function(e){function t(t){for(var n,l,a=t[0],p=t[1],i=t[2],c=0,s=[];c<a.length;c++)l=a[c],Object.prototype.hasOwnProperty.call(o,l)&&o[l]&&s.push(o[l][0]),o[l]=0;for(n in p)Object.prototype.hasOwnProperty.call(p,n)&&(e[n]=p[n]);for(f&&f(t);s.length;)s.shift()();return u.push.apply(u,i||[]),r()}function r(){for(var e,t=0;t<u.length;t++){for(var r=u[t],n=!0,a=1;a<r.length;a++){var p=r[a];0!==o[p]&&(n=!1)}n&&(u.splice(t--,1),e=l(l.s=r[0]))}return e}var n={},o={1:0},u=[];function l(t){if(n[t])return n[t].exports;var r=n[t]={i:t,l:!1,exports:{}};return e[t].call(r.exports,r,r.exports,l),r.l=!0,r.exports}l.m=e,l.c=n,l.d=function(e,t,r){l.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},l.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},l.t=function(e,t){if(1&t&&(e=l(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(l.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)l.d(r,n,function(t){return e[t]}.bind(null,n));return r},l.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return l.d(t,"a",t),t},l.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},l.p="./";var a=this.webpackJsonpstreamlit_component_template=this.webpackJsonpstreamlit_component_template||[],p=a.push.bind(a);a.push=t,a=a.slice();for(var i=0;i<a.length;i++)t(a[i]);var f=p;r()}([])</script><script src="./static/js/2.9330ddf9.chunk.js"></script><script src="./static/js/main.9ae4b44f.chunk.js"></script></body></html>
<!doctype html><html lang="en"><head><title>Streamlit Component</title><meta charset="UTF-8"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="Streamlit Component"/></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div><script>!function(e){function t(t){for(var n,l,a=t[0],p=t[1],i=t[2],c=0,s=[];c<a.length;c++)l=a[c],Object.prototype.hasOwnProperty.call(o,l)&&o[l]&&s.push(o[l][0]),o[l]=0;for(n in p)Object.prototype.hasOwnProperty.call(p,n)&&(e[n]=p[n]);for(f&&f(t);s.length;)s.shift()();return u.push.apply(u,i||[]),r()}function r(){for(var e,t=0;t<u.length;t++){for(var r=u[t],n=!0,a=1;a<r.length;a++){var p=r[a];0!==o[p]&&(n=!1)}n&&(u.splice(t--,1),e=l(l.s=r[0]))}return e}var n={},o={1:0},u=[];function l(t){if(n[t])return n[t].exports;var r=n[t]={i:t,l:!1,exports:{}};return e[t].call(r.exports,r,r.exports,l),r.l=!0,r.exports}l.m=e,l.c=n,l.d=function(e,t,r){l.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},l.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},l.t=function(e,t){if(1&t&&(e=l(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(l.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)l.d(r,n,function(t){return e[t]}.bind(null,n));return r},l.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return l.d(t,"a",t),t},l.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},l.p="./";var a=this.webpackJsonpstreamlit_component_template=this.webpackJsonpstreamlit_component_template||[],p=a.push.bind(a);a.push=t,a=a.slice();for(var i=0;i<a.length;i++)t(a[i]);var f=p;r()}([])</script><script src="./static/js/2.9330ddf9.chunk.js"></script><script src="./static/js/main.1a76c4f6.chunk.js"></script></body></html>
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
self.__precacheManifest = (self.__precacheManifest || []).concat([
{
"revision": "68914c7696f497e57843c252bcef8a43",
"revision": "279b8698cbab6a2d664098fb335835f4",
"url": "./index.html"
},
{
Expand All @@ -12,8 +12,8 @@ self.__precacheManifest = (self.__precacheManifest || []).concat([
"url": "./static/js/2.9330ddf9.chunk.js.LICENSE.txt"
},
{
"revision": "d2263eb7edcb1fb3e37a",
"url": "./static/js/main.9ae4b44f.chunk.js"
"revision": "4dbd63f22498e5a47816",
"url": "./static/js/main.1a76c4f6.chunk.js"
},
{
"revision": "7e9d84e346ce158d1e50",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
importScripts("https://storage.googleapis.com/workbox-cdn/releases/4.3.1/workbox-sw.js");

importScripts(
"./precache-manifest.3ad9568572eeefd3802f3ee4a74284a7.js"
"./precache-manifest.ca90bb69d909fe1f7175ebdd0dbb5e85.js"
);

self.addEventListener('message', (event) => {
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Large diffs are not rendered by default.

Loading