Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • seanrock 262 posts 483 karma points
    Jul 07, 2010 @ 22:37
    seanrock
    0

    Insert picture dialog does not honour constrain proportions

    When constrain proportions is not ticked, when i change (for example) the width, the height changes to the same value.  i have to add the image, then edit the width/height manually.

  • David Conlisk 432 posts 1008 karma points
    Jul 08, 2010 @ 11:05
  • Ken Mark 82 posts 94 karma points
    Jul 13, 2010 @ 10:00
    Ken Mark
    0

    It there another way to do it while we wait for a solution? A normal editor doesn't like editing the HTML :(

  • Ken Mark 82 posts 94 karma points
    Jul 13, 2010 @ 10:33
    Ken Mark
    2

    Ah, I made an easy fix myself instead. The main bug persist, but now you at least can change the proportions:

    In the file umbraco/plugins/tinymce3/insertImage.aspx

    Add this If-statement on line 110:

    if (jQuery("#constrain").attr("checked") == true) {

    Should look like this:

                if (jQuery("#constrain").attr("checked") == true) {
                    if (mode == "width") {
                        rTop.value = ((bTop.value * rBot.value) / bBot.value).toFixed(0);
                        rBot.value = Number(rBot.value).toFixed(0);
                    } else if (mode == "height") {
                        rBot.value = ((bBot.value * rTop.value) / bTop.value).toFixed(0);
                        rTop.value = Number(rTop.value).toFixed(0);
                    }
                }
Please Sign in or register to post replies

Write your reply to:

Draft