@innovastudio/contentbuilder 1.4.107 → 1.4.108
Sign up to get free protection for your applications and to get access to all the features.
package/package.json
CHANGED
@@ -49831,6 +49831,7 @@ class Image$1 {
|
|
49831
49831
|
});
|
49832
49832
|
document.querySelector('.moveable-control-box').style.display = 'none';
|
49833
49833
|
imageResizer.addEventListener('click', () => {
|
49834
|
+
if (!this.builder.activeImage) return;
|
49834
49835
|
this.builder.activeImage.click();
|
49835
49836
|
this.repositionImageTool();
|
49836
49837
|
this.builder.elmTool.repositionElementTool();
|
@@ -82025,6 +82026,15 @@ class ContentBuilder {
|
|
82025
82026
|
if (this.viewImageUrl) {
|
82026
82027
|
src = this.viewImageUrl + '?url=' + src;
|
82027
82028
|
}
|
82029
|
+
if (src.includes('http') && this.viewFileUrl) {
|
82030
|
+
/*
|
82031
|
+
Can be from:
|
82032
|
+
External site,
|
82033
|
+
ex:
|
82034
|
+
http://bucket-name.s3-website-us-east-1.amazonaws.com/readme.txt
|
82035
|
+
*/
|
82036
|
+
src = this.viewFileUrl + '?url=' + src;
|
82037
|
+
}
|
82028
82038
|
const width = 512;
|
82029
82039
|
const height = 512;
|
82030
82040
|
const img = new Image();
|
@@ -82052,7 +82062,7 @@ class ContentBuilder {
|
|
82052
82062
|
body: JSON.stringify(messages)
|
82053
82063
|
});
|
82054
82064
|
const result = await response.json();
|
82055
|
-
callback(
|
82065
|
+
callback(result.url);
|
82056
82066
|
};
|
82057
82067
|
}
|
82058
82068
|
async generateImage(prompt, callback) {
|
@@ -82096,7 +82106,7 @@ class ContentBuilder {
|
|
82096
82106
|
if (this.imageAutoUpscale) {
|
82097
82107
|
this.upscaleImage(imageUrl, callback);
|
82098
82108
|
} else {
|
82099
|
-
callback(
|
82109
|
+
callback(imageUrl);
|
82100
82110
|
}
|
82101
82111
|
} catch (error) {
|
82102
82112
|
if (error.name === 'AbortError') ; else {
|