creativeaura / threesixty-slider

jQuery 360 image slider plugin
http://creativeaura.github.io/threesixty-slider
854 stars 233 forks source link

Data transfer mobile friendly click to load option and demo #55

Open kacperpl1 opened 9 years ago

kacperpl1 commented 9 years ago

I made this for my site but I think it would be a nice feature to implement in the slider.

I've got an initial image and 360 icon over it which onclick initializes the slider. It enables you to load a lightweight version of the site on mobile and let users choose if they want to see the 360 view for additional data transfer. The icon has info on how much additional data needs to be loaded. This could be also coded as parameter.

Additionally there could be an option to use only percentage of images on mobile/3G detection like half or third so its more lightweight.

simonseddon commented 9 years ago

A simple 'step' parameter would be a nice way around this. Specifying half / third / etc. could look janky depending on whether your total images divide nicely. Then the script could be passed a different 'step' parameter depending on the viewport width.

I don't see the click-to-initialize or total load data being a problem for this plugin to solve since it's easy to code yourself if required.

kacperpl1 commented 9 years ago

Yeah of course you're right about specifying the step by number. About the click to load - being easy and very useful thing makes it good idea for a feature inside the plugin.

simonseddon commented 9 years ago

Sorry I didn't mean to play down your request, it just seems like adding a click handler is so trivial to do that adding it as a feature falls outside of the scope. You could also argue that initializing the load when the element is scrolled in to view would be useful, etc., but it's all bloating the one feature which this plugin does so well.

Perhaps an alternative would be additions to the API to abstract the functionality of the plugin in to bitesized functions with callbacks and additional options where appropriate and then an autoInitialize option in the setup options which could be set to false. That could simplify a custom set-up?

As an aside, a destroy method would be useful for some circumstances.

kacperpl1 commented 9 years ago

No problem, I understood what you mean. I just meant it as something that I believe might be a standard option for data-heavy plugin regarding mobile use.

I'm happy with how it works and it's completely fine for me to do this myself, but I just thought that might be good as a built in functionality or as a demo how it can be used for mobiles.

And yeah - destroy would be good too when using single file tabbed page for example or switching through multiple threesixties.