Adding classes according to flipX, flipY settings and flipping using css
parent
e8913e3141
commit
ecfdb37f93
|
@ -119,7 +119,9 @@ def index():
|
||||||
enableGCodeVisualizer=settings().get(["feature", "gCodeVisualizer"]),
|
enableGCodeVisualizer=settings().get(["feature", "gCodeVisualizer"]),
|
||||||
enableSystemMenu=settings().get(["system"]) is not None and settings().get(["system", "actions"]) is not None and len(settings().get(["system", "actions"])) > 0,
|
enableSystemMenu=settings().get(["system"]) is not None and settings().get(["system", "actions"]) is not None and len(settings().get(["system", "actions"])) > 0,
|
||||||
enableAccessControl=userManager is not None,
|
enableAccessControl=userManager is not None,
|
||||||
enableSdSupport=settings().get(["feature", "sdSupport"])
|
enableSdSupport=settings().get(["feature", "sdSupport"]),
|
||||||
|
webcamFlipX=settings().get(["webcam", "flipX"]),
|
||||||
|
webcamFlipY=settings().get(["webcam", "flipY"])
|
||||||
)
|
)
|
||||||
|
|
||||||
#~~ Printer control
|
#~~ Printer control
|
||||||
|
|
|
@ -35,7 +35,7 @@ default_settings = {
|
||||||
"snapshot": None,
|
"snapshot": None,
|
||||||
"ffmpeg": None,
|
"ffmpeg": None,
|
||||||
"bitrate": "5000k",
|
"bitrate": "5000k",
|
||||||
"watermark": True
|
"watermark": True,
|
||||||
"flipX": False,
|
"flipX": False,
|
||||||
"flipY": False
|
"flipY": False
|
||||||
},
|
},
|
||||||
|
|
|
@ -359,6 +359,18 @@ ul.dropdown-menu li a {
|
||||||
#webcam_container {
|
#webcam_container {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
#webcam_container.flipX {
|
||||||
|
-webkit-transform: scaleX(-1);
|
||||||
|
-moz-transform: scaleX(-1);
|
||||||
|
}
|
||||||
|
#webcam_container.flipY {
|
||||||
|
-webkit-transform: scaleY(-1);
|
||||||
|
-moz-transform: scaleY(-1);
|
||||||
|
}
|
||||||
|
#webcam_container.flipX.flipY {
|
||||||
|
-webkit-transform: scaleX(-1) scaleY(-1);
|
||||||
|
-moz-transform: scaleX(-1) scaleY(-1);
|
||||||
|
}
|
||||||
|
|
||||||
/** GCODE file manager */
|
/** GCODE file manager */
|
||||||
|
|
||||||
|
|
|
@ -310,7 +310,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="tab-pane" id="control">
|
<div class="tab-pane" id="control">
|
||||||
{% if webcamStream %}
|
{% if webcamStream %}
|
||||||
<div id="webcam_container">
|
<div id="webcam_container" class="{{ 'flipX' if webcamFlipX else '' }} {{ 'flipY' if webcamFlipY else '' }}">
|
||||||
<img id="webcam_image" src="{{ webcamStream }}">
|
<img id="webcam_image" src="{{ webcamStream }}">
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
Loading…
Reference in New Issue