mirror of
https://github.com/viliusle/miniPaint.git
synced 2026-02-06 15:51:47 +00:00
Only fix selection aspect ratio on images
This commit is contained in:
parent
14c7b9e8e0
commit
56377c00b2
@ -101,10 +101,13 @@ class Select_tool_class extends Base_tools_class {
|
||||
var mouse = this.get_mouse_info(e);
|
||||
if (mouse.valid == false || mouse.click_valid == false)
|
||||
return;
|
||||
if (this.Base_selection.mouse_lock != null)
|
||||
if (this.Base_selection.mouse_lock != null) {
|
||||
this.Base_selection.find_settings().keep_ratio = config.layer.type === 'image';
|
||||
return;
|
||||
}
|
||||
|
||||
this.auto_select_object(e);
|
||||
this.Base_selection.find_settings().keep_ratio = config.layer.type === 'image';
|
||||
this.saved = false;
|
||||
|
||||
this.last_post = {
|
||||
|
||||
@ -1563,14 +1563,14 @@ class Text_class extends Base_tools_class {
|
||||
*/
|
||||
|
||||
resize_to_dynamic_bounds(layer, editor) {
|
||||
if (layer.params.boundary === 'dynamic') {
|
||||
if (layer && layer.params && layer.params.boundary === 'dynamic') {
|
||||
layer.width = editor.textBoundaryWidth + 1;
|
||||
layer.height = editor.textBoundaryHeight + 1;
|
||||
}
|
||||
}
|
||||
|
||||
extend_fixed_bounds(layer, editor) {
|
||||
if (layer.params.boundary !== 'dynamic') {
|
||||
if (layer && layer.params && layer.params.boundary !== 'dynamic') {
|
||||
const params = this.getParams();
|
||||
const isHorizontalTextDirection = ['ltr', 'rtl'].includes(params.textDirection);
|
||||
if (isHorizontalTextDirection) {
|
||||
|
||||
@ -53,7 +53,7 @@ module.exports = {
|
||||
],
|
||||
devtool: "cheap-module-source-map",
|
||||
devServer: {
|
||||
host: '0.0.0.0',
|
||||
// host: '0.0.0.0',
|
||||
contentBase: "./",
|
||||
compress: true,
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user