We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 51006
    • 1 Posts
    Hello,

    I'm trying to make a TV for uploading images to use in a image slider.
    Therefore I want to crop the images with fixed proportions.

    I used the following:
    Formtabs:
    [{"caption":"Product foto's","fields":[{"field":"naam","caption":"Naam","inputTVtype":"imageplus","targetRatio":"1",}]
    }]
    


    Columns
    [{"header":"Naam","sortable":"true","dataIndex":"naam","renderer":"ImagePlus.MIGX_Renderer"}]
    


    Now when I want to add an image, I can crop the image, But it doesn't use the targetRatio.
    Does anyone now what I have don wrong?

    Thanks for your help.

    Regards,

    Anno

      • 13428 ☆ A M B ☆
      • 1,031 Posts
      Try this please:
      [{"caption":"Product foto's","fields":[{"field":"naam","caption":"Naam","inputTVtype":"imageplus","configs":{"targetRatio":"1"}}]}]
        • 51006
        • 1 Posts
        Hello Jako.

        Thanks for your reply.
        I tried, but no difference.
        Still doesn't use the ratio.

          • 46073
          • 65 Posts
          I have been searching the internet for this very question for an hour, any luck getting targetRatio to work?
            • 4172
            • 5,888 Posts
            try

            ,"configs":"{\"targetRatio\":\"1\"}"
              -------------------------------

              you can buy me a beer, if you like MIGX

              http://webcmsolutions.de/migx.html

              Thanks!
              • 47717
              • 144 Posts
              Quote from: Bruno17 at Dec 15, 2015, 09:01 AM
              try

              ,"configs":"{\"targetRatio\":\"1\"}"

              Thank you Bruno, this worked !!
                • 13428 ☆ A M B ☆
                • 1,031 Posts
                Thats the problem with nested json encoding of already json encoded strings. Thanks for the right direction @Bruno.