mirror of
https://github.com/gradio-app/gradio.git
synced 2025-01-30 11:00:11 +08:00
fix sketchpad issue
This commit is contained in:
parent
ed5108dc07
commit
4aaf5ab09f
@ -1,6 +1,11 @@
|
||||
.hide {
|
||||
display: none !important;
|
||||
}
|
||||
.sketchpad {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: 100%;
|
||||
}
|
||||
.sketch_tools {
|
||||
flex: 0 1 auto;
|
||||
display: flex;
|
||||
@ -40,7 +45,7 @@
|
||||
.canvas_holder {
|
||||
text-align: center;
|
||||
width: 100%;
|
||||
height: calc(100% - 36px);
|
||||
height: 100%;
|
||||
}
|
||||
.saliency_holder {
|
||||
position: absolute;
|
||||
|
@ -98,7 +98,7 @@ const image_input = {
|
||||
} else if (this.source == "canvas") {
|
||||
io.target.find(".sketchpad").removeClass("hide");
|
||||
var dimension = Math.min(this.target.find(".canvas_holder").width(),
|
||||
this.target.find(".canvas_holder").height()) - 2 // dimension - border
|
||||
this.target.find(".canvas_holder").height()) - 2 // dimension - border
|
||||
var id = this.id;
|
||||
this.sketchpad = new Sketchpad({
|
||||
element: '.interface[interface_id=' + id + '] .sketch',
|
||||
|
@ -1,6 +1,11 @@
|
||||
.hide {
|
||||
display: none !important;
|
||||
}
|
||||
.sketchpad {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: 100%;
|
||||
}
|
||||
.sketch_tools {
|
||||
flex: 0 1 auto;
|
||||
display: flex;
|
||||
@ -40,7 +45,7 @@
|
||||
.canvas_holder {
|
||||
text-align: center;
|
||||
width: 100%;
|
||||
height: calc(100% - 36px);
|
||||
height: 100%;
|
||||
}
|
||||
.saliency_holder {
|
||||
position: absolute;
|
||||
|
@ -98,7 +98,7 @@ const image_input = {
|
||||
} else if (this.source == "canvas") {
|
||||
io.target.find(".sketchpad").removeClass("hide");
|
||||
var dimension = Math.min(this.target.find(".canvas_holder").width(),
|
||||
this.target.find(".canvas_holder").height()) - 2 // dimension - border
|
||||
this.target.find(".canvas_holder").height()) - 2 // dimension - border
|
||||
var id = this.id;
|
||||
this.sketchpad = new Sketchpad({
|
||||
element: '.interface[interface_id=' + id + '] .sketch',
|
||||
|
Loading…
Reference in New Issue
Block a user