Open markus-drupal opened 4 years ago
Sorry, it's been a long time since I looked at this code. Did you try calling $.colorbox.resize()
? It was intended to address the situation I think you are describing, but maybe I'm missing something.
Hi Jack, thanks for checking this as fast!
I tried resize first, but it does not compute well the new size of the modal. When using the next/prev methods did it well, so I implemented this redraw() idea, which is just like next/prev on the current slide. The magic that works well to compute the new dimensions and position of the model happens in launch().
Oh and I just added a new commit to ensure the modal is not re-opened if it was closed.
Regards! Marc
This is necesssary to be able to redraw the colorbox on the current slide to force re-position or resize based on events that are not controlled by dom events. It is not possible to implement such a method from outside the colorbox plugin because it uses internal variables that cannot be accessed from the outter space...