Re: estimate display area of block
Michael J Rubinsky <[email protected]> Sun, 16 Jul 2017 22:44:02 +0000
| Newsgroups | gmane.comp.horde.devel |
|---|---|
| Message-ID | <20170716224402.Horde.SppyYA2BSFn0XZRz4TYCF_G@h4.theupstairsroom.com> |
Quoting Sebastian Birnbach <[email protected]>: > I am working on a block that outputs an SVG visualisation. It would be > helpful to know how much space there is available. > I see that there is no way of knowing this in terms of cm or px. Is there > at least a way of determining the column width of the block (1-col, 2-col)? Obviously you would need to get the px dimensions from the front ent. I.e., in Javascript. As far as the layout properties, a Block doesn't know anything about it's layout, that's the job of the Collection and Layout managers. You might be able to look up the block's details by grabbing the layout from Horde_Core_Block_Collection from within your block's code. Otherwise, I'd suggest using javascript to get the dimensions of a specific div (or other DOM element) inside your block's own DOM element. > > Thanks > > birnbacs > -- > dev mailing list > Frequently Asked Questions: http://wiki.horde.org/FAQ > To unsubscribe, mail: [email protected] -- mike The Horde Project http://www.horde.org https://www.facebook.com/hordeproject https://www.twitter.com/hordeproject -- dev mailing list Frequently Asked Questions: http://wiki.horde.org/FAQ To unsubscribe, mail: [email protected]
(unnamed)
(application/pgp-keys, 9.1 KB) - not displayed
signature.asc
(application/pgp-signature, 821 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4 iQIcBAABAgAGBQJZa+wyAAoJEJGSgkbRsxbbJ3cP/1bbqx74XyzZy+XnDJJkZc8Y fU3gFggvyOtoxW45Z9r4cUI1xulvbyRYr622yPJsJ3lh1Yp0eeJ79OzX9+n5+Kif 9vCxIZB5Z2MTdRa9NrhGW5gEhwK0+ke6PNcnp7WVe3u1cscsKipu+04ovh1vtluJ PNTSAWAQxOQUtYQmatLr4oSYVcZnK1+UWvcjOIvRSQYb+HdTOsjN05CddgAL4qDg f7MFv/jV4N8n7sp6e6D57XvVhrb3vGBwSB1HeF6syT/Hm84jVTLqwayU9vVb4R+A djCRzblDRQUKxncTvkk3bgzKu/iLgTQs6rfqdfe5j09McZALhnU3q6+ivieQav5W abeUJSgtk9NzOVJ6i9x2Z/mva39MW1kih5yTGlU9A7ZgM0hu8J1cXDYAiZpE+jmt 4ubaRSnC0qI+5uFcT4RxhQGwd1EqtvtkBvxGjFS0bS1Vja7ToQ9bT/pvxmIGn/if PKSTQ5GyWRpPZuB6ngH3ROQNaOd1gv7/JoTbWOGq/nHliD6w9+hOQM+iDzLNm0oO OJbqJiJaof2azWJd9oiYM4TTeZ8k3BoZ9AfSaZ7Bwr5RutRb7Uy4jINgbg/orguu RlHCibd+lXmS4G2Faqo9LiVmEN8swnGYD0cTV7G7A+Iz1ky50KXKHCKO8kwdp6VM xgyLKsq71i9/rbEqEXtJ =yZNX -----END PGP SIGNATURE-----