Adding classes according to flipX, flipY settings and flipping using css

This commit is contained in:
peteruithoven committed 2013-06-19 02:39:49 +02:00
1 parent e8913e3141
commit ecfdb37f93
4 files changed
+17 -3

No files matched your search

+3 -1
View File
@@ -119,7 +119,9 @@ def index():
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,
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
+1 -1
View File
@@ -35,7 +35,7 @@ default_settings = {
"snapshot": None,
"ffmpeg": None,
"bitrate": "5000k",
"watermark": True
"watermark": True,
"flipX": False,
"flipY": False
},
+12
View File
@@ -359,6 +359,18 @@ ul.dropdown-menu li a {
#webcam_container {
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 */
+1 -1
View File
@@ -310,7 +310,7 @@
</div>
<div class="tab-pane" id="control">
{% 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 }}">
</div>
{% endif %}