Fork me on GitHub
#hoplon
<
2016-10-13
>
vigilancetech02:10:34

@jumblerg so is there an attrib or an argument to an attrib for gutter than just means "as much as possible?"

jjttjj03:10:18

@vigilancetech there's no testing branch on github, only master. If you put it up i'll take a look at it. or if you send a rough sketch image or something of what you're trying to do

vigilancetech03:10:38

sorry, I just pushed testing. Its there now.

jjttjj03:10:01

i'll check it out in a little. In the meantime I just played around a little with images on top of images for the first time. have you tried anything like this?

(image :url ""
        (elem :sh (r 1 2) :ah :mid
              (image :url ""
                     :s 100
                     :b 3 :bc :white))
        (elem :sh (r 1 2) :ah :mid
              (image :url ""
                     :s 100
                     :b 3 :bc :white)))

jjttjj03:10:22

is that anything like what you're going for?

jjttjj03:10:32

i'm not positive but i think padding might not be working properly for images within images. but i think padding may not be the answer to what you're looking for anyway?

vigilancetech03:10:14

I need no padding on the upper corners. Max gutter between the images that are on top of the other images.

vigilancetech03:10:40

I can get the one on the upper left to have no padding, but not the upper right, and when I increase the gutter too much the middle image vanishes

vigilancetech03:10:48

also it changes size as I change the gutter

vigilancetech03:10:54

and that's kind of annoying

vigilancetech03:10:15

but maybe I need to not use (r) and just use :s

jjttjj03:10:25

so like that?

vigilancetech03:10:41

I'm kind of reluctant to use :s because it may run on different resolutions

vigilancetech03:10:48

how did you do it?

jjttjj03:10:10

that example i posted above, just change :ah in the first image to :beg and in the second image to :end

vigilancetech03:10:27

ok, thanks, I'll play with that a bit

jjttjj03:10:07

sorry i mean :ah in the elem parents of the image

vigilancetech05:10:12

Can all the same attribs that can be put in an elem also be put in an image, like for placing subimages/subelems?

jjttjj05:10:05

Yeah. If you look at the ui.cljs source you can see an image is a "node", so its args are run through all the middlewares a normal elem is run through

jumblerg17:10:50

@vigilancetech: the padding attributes have not been implemented for the image, video, and a handful of other elements that use a different implementation for positioning children. their implementations differ because their native equivalents don’t permit children at all; they way you would overlay in image, using html, would be to absolutely position another element over it. the ui approach permits us, at the user level, to continue laying out elems left-right-top-bottom.

jumblerg17:10:58

this, of course, assumes the implementation is complete. it is relatively straightforward to do, but i did the bare minimum i needed at the time to ship a feature. i’ll try to add these soon.

jumblerg17:10:01

apologies for not getting back to you in an more timely manner; i haven’t been behind my laptop much over the past couple days.

jumblerg17:10:51

you can see where i started to implement the padding here, but then stopped because those attributes are owned by the pad middleware further up. https://github.com/hoplon/ui/blob/master/src/hoplon/ui.cljs#L455

jumblerg17:10:28

the right approach is probably to create separate, general padding and gutter wrappers for elements that don’t normally take children.