bugfix
This commit is contained in:
parent
85f3d1ba63
commit
85e9b0a370
@ -489,6 +489,7 @@ bricks.UiFile =class extends bricks.UiStr {
|
|||||||
bricks.UiImage =class extends bricks.VBox {
|
bricks.UiImage =class extends bricks.VBox {
|
||||||
constructor(opts){
|
constructor(opts){
|
||||||
opts.name = opts.name || 'image';
|
opts.name = opts.name || 'image';
|
||||||
|
opts.width = opts.width || '100%';
|
||||||
super(opts);
|
super(opts);
|
||||||
this.uitype='image';
|
this.uitype='image';
|
||||||
this.camera_w = new bricks.Svg({
|
this.camera_w = new bricks.Svg({
|
||||||
@ -551,6 +552,9 @@ bricks.UiImage =class extends bricks.VBox {
|
|||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
this.set_css('hover', true);
|
this.set_css('hover', true);
|
||||||
const file = event.dataTransfer.files[0];
|
const file = event.dataTransfer.files[0];
|
||||||
|
const dt = new DataTransfer();
|
||||||
|
dt.items.add(file);
|
||||||
|
this.input.files = dt.files;
|
||||||
this.show_image(file);
|
this.show_image(file);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user