Hi,

After read colorbox documentation I found the width and weight is optional by default.

So on colorbox_handler_field_colorbox.inc i comment this 2 lines:

// 'width' => $width,
// 'height' => $height,

almost at the end of the file.

Now the trigger autoresize.

As I dont know if this have impact in other aspects of the module, for me (who just use on views) I dont get any errors and all work well, so I just leave here to help some people who have same issue.

Comments

pwesthagen’s picture

It's possible and better to simply set width and height to null in the configure field dialog for the trigger.

Hydra’s picture

Category: task » feature
Status: Needs work » Active

what pwesthagen is saying is right! Thank you very much, helped me at the right moment to find your post. I would propose to patch the description, that everyone has this information.

What was exactly the matter for the maintainers to "hide" this feature, would probably be usefull to tell the people this in the description as well, that if they set the value to null *the reason* could happen.

greenwork’s picture

I have a similar situation that I need an auto size of a percent (say 95% of the screen res). Perhaps I missed a note somewhere about adding this in the INLINE string. I have tried a few variations but no success yet. Sorry if I hijacked this question but it seems similar.

frjo’s picture

Status: Active » Closed (won't fix)

Closing old issues that doesn't seem to affect a lot of users.

greenwork’s picture

Dimensions
width false Set a fixed total width. This includes borders and buttons. Example: "100%", "500px", or 500
height false Set a fixed total height. This includes borders and buttons. Example: "100%", "500px", or 500

greenwork’s picture

I forget if i had to do it in asci not sure though anyways % -> %

hope that helps anyone

greenwork’s picture

Status: Closed (won't fix) » Closed (fixed)
nordicmaterial’s picture

Issue summary: View changes

Current version 7.x-2.7 has width and height hardcoded on line 26 and 27 in modules/colorbox/views/colorbox_handler_field_colorbox.inc. How can we enable auto-resizing for current version?

- Removing line 26 and 27: doesn't work

- Adapting line 26-27:
array('default' => '400px'); to array('default' => '');
array('default' => '600px'); to array('default' => '');
doesn't work either

- Commenting the lines
// 'width' => $width,
// 'height' => $height,
doesn't work either.

- Setting width and height to "null" or "auto" in the configure field dialog for the trigger doesn't work either.

There is no resizing: colorbox just fills up 100% of the screen.
Using colorbox anywhere else in the website has auto-resize working perfectly though.
Any idea how to solve this?

nordicmaterial’s picture

Status: Closed (fixed) » Active
kopeboy’s picture

Version: 7.x-1.x-dev » 7.x-2.x-dev
Category: Feature request » Support request

Interested as well.

Using Colorbox trigger in view makes the autoresize feature not working :(
Why is it any different?!

Shouldn't we able to resize the image after it's loaded with some js?

Neslee Canil Pinto’s picture

Status: Active » Closed (won't fix)