Skip to content

Commit

Permalink
Fixed image flip
Browse files Browse the repository at this point in the history
  • Loading branch information
insane1304 committed May 22, 2021
1 parent 053585f commit f42eb4e
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
3 changes: 2 additions & 1 deletion views/admin_profile.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,8 @@
<label for="pic">User Pic</label>
<div class="">
<img name="pic" style="align: center; margin: auto;padding: 10px;height: 150px;width:150px" src="<%= visitor.url %>" alt="">
<img name="pic" style="align: center; margin: auto;padding: 10px;height: 150px;width:150px -webkit-transform: scaleX(-1);
transform: scaleX(-1);" src="<%= visitor.url %>" alt="">
</div>
</div>
Expand Down
7 changes: 6 additions & 1 deletion views/signup.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@

<div class="container" id="head-color">

<form id="signup-form" style="margin-top: 80px" action="/signup" method="post" >
<form id="signup-form" style="margin-top: 80px" >

<p style="font-size: 40px">New Visitor Registration</p>

Expand Down Expand Up @@ -278,6 +278,7 @@
// Draw image
var context = canvas.getContext('2d');
// context.scale(-1, 1);
snap.addEventListener("click", function() {
context.drawImage(video, 0, 0, 300, 300);
var image = new Image();
Expand Down Expand Up @@ -350,6 +351,10 @@ async function uploadImage() {
.then((url) => {
// console.log(url);
document.getElementById("url").value = url;
// action="/signup" method="post"
$("#signup-form").attr("action","signup");
$("#signup-form").attr("method","post");
$("#signup-form").submit();
})
Expand Down
3 changes: 2 additions & 1 deletion views/visitor_profile.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,8 @@
<%= Visitor_Name %>
</h1>
<div class="">
<img style="text-align: right; margin: auto; margin-right: 10px; padding: 20px; height: 200px; width:200px; display:block"src="<%= visitor.url %>" alt="">
<img style="text-align: right; margin: auto; margin-right: 10px; padding: 20px; height: 200px; width:200px; display:block -webkit-transform: scaleX(-1);
transform: scaleX(-1);"src="<%= visitor.url %>" alt="">
</div>

<h3 style="text-align: center; margin: auto;padding: 10px; ">Status: <%= visitor.status %></h3>
Expand Down

0 comments on commit f42eb4e

Please sign in to comment.