Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions modules/ROOT/pages/8.12.0-release-notes.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,11 @@ For information on using Enhanced Skins & Icon Packs, see: xref:enhanced-skins-a

// CCFR here.

=== New `+ratio+` option for the `+sizeinput+` dialog component, used to keep proportions when the width or height is blank
// #TINYMCE-9866

In {productname} {release-version}, the xref:dialog-components.adoc#sizeinput[`+sizeinput+`] dialog component has a new optional xref:dialog-components.adoc#sizeinput-ratio[`+ratio+`] option. Custom dialogs can use it to keep proportions when the width or height field is empty, in the same way as the image dialog.


[[changes]]
== Changes
Expand Down Expand Up @@ -160,6 +165,13 @@ For information on using Enhanced Skins & Icon Packs, see: xref:enhanced-skins-a

// CCFR here.

=== The image dialog's constrain proportions lock had no effect when the image was missing a width or height
// #TINYMCE-9866

Previously, the constrain proportions lock in the image dialog had no effect when the image had no width or height, or when one of the two size fields was cleared. Typing a size into the empty field left the other field unchanged. As a result, users could not resize these images while keeping the proportions, and had to work out the matching size by hand.

In {productname} {release-version}, the constrain proportions lock uses the original proportions of the image when one of the size fields is empty. Opening and saving the dialog does not add a width or height to the image, and entering a single size still leaves the other field empty so the image scales naturally.


[[security-fixes]]
== Security fixes
Expand Down
19 changes: 19 additions & 0 deletions modules/ROOT/pages/dialog-components.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -513,6 +513,25 @@ A *sizeinput* is a specialized composite component with two input fields labelle
}
----

[[sizeinput-ratio]]
==== ratio

NOTE: The `+ratio+` option is only available in {productname} 8.12 and later.

`+ratio+` is an optional property of `+sizeinput+`.

Use `+ratio+` to keep proportions when the width or height field is empty. Set it to the width divided by the height, as a number or as a function that returns a number.

[source,js]
----
{
type: 'sizeinput', // component type
name: 'size', // identifier
label: 'Dimensions',
ratio: 16 / 9 // width divided by height
}
----

[[slider]]
=== slider

Expand Down
Loading