Skip to content

Commit 8e97c29

Browse files
committed
Change the order of the overlays
1 parent 8c1672b commit 8e97c29

File tree

3 files changed

+10
-9
lines changed

3 files changed

+10
-9
lines changed

js/asset-edit.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

php/class-relate.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ public static function get_transformations( $attachment_id, $as_string = false,
142142
$image_overlay = self::get_overlay( $attachment_id, 'image_overlay' );
143143

144144
// Merge transformations with overlays.
145-
$parts = array_filter( array( $transformations, $image_overlay, $text_overlay ) );
145+
$parts = array_filter( array( $transformations, $text_overlay, $image_overlay ) );
146146
$transformations = ! empty( $parts ) ? implode( '/', $parts ) : '';
147147
}
148148

src/js/asset-edit.js

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -506,9 +506,10 @@ const AssetEdit = {
506506
return `${textLayerDefinition}/fl_layer_apply${placementString}`;
507507
},
508508
buildSrc() {
509-
const imageOverlay = this.buildImageOverlay();
510-
const textOverlay = this.buildTextOverlay();
511509
const transformations = this.transformationsInput.value;
510+
const textOverlay = this.buildTextOverlay();
511+
const imageOverlay = this.buildImageOverlay();
512+
512513

513514
// For images, build the full URL
514515
const urlParts = [this.base];
@@ -531,8 +532,8 @@ const AssetEdit = {
531532
}
532533

533534
// Add overlays
534-
addPart(imageOverlay, 'string-preview-image-overlay');
535535
addPart(textOverlay, 'string-preview-text-overlay');
536+
addPart(imageOverlay, 'string-preview-image-overlay');
536537

537538
addPart(this.publicId, 'string-preview-public-id', this.publicId, false);
538539

@@ -554,14 +555,14 @@ const AssetEdit = {
554555
transformationParts.push(transformations);
555556
}
556557

557-
if (imageOverlay) {
558-
transformationParts.push(imageOverlay);
559-
}
560-
561558
if (textOverlay) {
562559
transformationParts.push(textOverlay);
563560
}
564561

562+
if (imageOverlay) {
563+
transformationParts.push(imageOverlay);
564+
}
565+
565566
return transformationParts.join('/');
566567
},
567568
getOverlayData(map) {

0 commit comments

Comments
 (0)