fixes #124
System clipboard paste was not working correctly Signed-off-by: Victor Seiji Hariki <victorseijih@gmail.com>
This commit is contained in:
parent
aa3ec73b45
commit
100829298c
1 changed files with 3 additions and 2 deletions
|
@ -592,11 +592,12 @@ const selectTransformTool = () =>
|
||||||
for (const item of items) {
|
for (const item of items) {
|
||||||
for (const type of item.types) {
|
for (const type of item.types) {
|
||||||
if (type.startsWith("image/")) {
|
if (type.startsWith("image/")) {
|
||||||
item.getType(type).then((blob) => {
|
item.getType(type).then(async (blob) => {
|
||||||
// Converts blob to image
|
// Converts blob to image
|
||||||
const url = window.URL || window.webkitURL;
|
const url = window.URL || window.webkitURL;
|
||||||
const image = document.createElement("img");
|
const image = document.createElement("img");
|
||||||
image.src = url.createObjectURL(file);
|
image.src = url.createObjectURL(blob);
|
||||||
|
await image.decode();
|
||||||
tools.stamp.enable({
|
tools.stamp.enable({
|
||||||
image,
|
image,
|
||||||
back: tools.selecttransform.enable,
|
back: tools.selecttransform.enable,
|
||||||
|
|
Loading…
Reference in a new issue