如何使用getOptions在Jcrop中检索truesize数组值

How do I use getOptions to retrieve the truesize array values in Jcrop?

本文关键字:检索 truesize 数组 Jcrop 何使用 getOptions      更新时间:2023-12-01

如何使用getOptions在Jcrop中检索truesize数组值?

我可以使用setOptions没有问题的

api.setOptions({trueSize: [w, h]});

在下面的链接中找到了一些关于它的东西,但仍然不知道如何使用它。https://github.com/nathanaeljones/Jcrop/commit/714c2d86983f587c1c7e6203a88fb0dc8bf03cd7

getOptions()函数将选项作为对象返回,因此您需要访问它,如下所示

  jcrop_api.getOptions().boxWidth
  jcrop_api.getOptions().maxSize