Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
2 changes: 1 addition & 1 deletion requirements.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
jsonschema
wslink
wslink<2
websocket-client
41 changes: 25 additions & 16 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,47 +1,56 @@
#
# This file is autogenerated by pip-compile with Python 3.9
# This file is autogenerated by pip-compile with Python 3.10
# by the following command:
#
# pip-compile requirements.in
#
aiohttp==3.9.3
aiohappyeyeballs==2.6.1
# via aiohttp
aiohttp==3.12.14
# via wslink
aiosignal==1.3.1
aiosignal==1.4.0
# via aiohttp
async-timeout==4.0.3
async-timeout==5.0.1
# via aiohttp
attrs==23.2.0
attrs==25.3.0
# via
# aiohttp
# jsonschema
# referencing
frozenlist==1.4.1
frozenlist==1.7.0
# via
# aiohttp
# aiosignal
idna==3.6
idna==3.10
# via yarl
jsonschema==4.21.1
jsonschema==4.24.0
# via -r requirements.in
jsonschema-specifications==2023.12.1
jsonschema-specifications==2025.4.1
# via jsonschema
multidict==6.0.5
multidict==6.6.3
# via
# aiohttp
# yarl
python-dotenv==1.0.1
# via -r requirements.in
referencing==0.33.0
propcache==0.3.2
# via
# aiohttp
# yarl
referencing==0.36.2
# via
# jsonschema
# jsonschema-specifications
rpds-py==0.18.0
rpds-py==0.26.0
# via
# jsonschema
# referencing
websocket-client==1.7.0
typing-extensions==4.14.1
# via
# aiosignal
# multidict
# referencing
websocket-client==1.8.0
# via -r requirements.in
wslink==1.12.4
# via -r requirements.in
yarl==1.9.4
yarl==1.20.1
# via aiohttp
19 changes: 10 additions & 9 deletions src/opengeodeweb_viewer/rpc/viewer/viewer_protocols.py
Original file line number Diff line number Diff line change
Expand Up @@ -281,19 +281,20 @@ def renderNow(self, params):

@exportRpc(viewer_prefix + viewer_schemas_dict["set_z_scaling"]["rpc"])
def setZScaling(self, params):

validate_schema(
params, self.viewer_schemas_dict["set_z_scaling"], self.viewer_prefix
)
z_scale = params["z_scale"]

renderWindow = self.getView("-1")
renderer = renderWindow.GetRenderers().GetFirstRenderer()

actors = renderer.GetActors()

for actor in actors:
transform = vtkTransform()
transform.Scale(1, 1, z_scale)
actor.SetUserTransform(transform)
cam = renderer.GetActiveCamera()
transform = vtk.vtkTransform()
transform.Scale(1, 1, z_scale)
cam.SetModelTransformMatrix(transform.GetMatrix())

if "grid_scale" in self.get_data_base():
cube_axes_actor = self.get_object("grid_scale")["actor"]
cube_axes_actor.SetUse2DMode(1)
else:
Exception("The object 'grid_scale' does not exist.")
self.render()