This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Auto opening widget, Changing camera view in 1 small widget
#24
I found the solution for autoopening widgets.

For properly open widget:

1) If this is before using any widget you should give proper style to class 'widgets' e.g.:
Code:
$('.widgets').css({'width': '720px', 'height': '1280px', 'margin-left': '-360px', 'margin-top': '-640px', 'transform': 'matrix(0.37109, 0, 0, 0.37109, 0, 0)'})

2) Before opening widget it should be appended to div with class ('.widgets'):
Code:
$('#widget-176').appendTo('.widgets')

3) Now widget can be opened(remove class 'hide' and set attribute 'display' to 'block'):
Code:
$('#widget-176').removeClass('hide').css("display", "block"); }


It works almost fine but there is a problem when I change the screen resolution(e.g. change a client from PC to iPhone). I see that attribute 'transform' from 1) step should be variable and should be calculated for current resolution not constant like I've prepared.

Maybe you admin or Erwin could advice some solution?
Reply


Messages In This Thread
RE: Auto opening widget, Changing camera view in 1 small widget - by buuuudzik - 26.01.2017, 20:50

Forum Jump: