|
Lumpy posted:This is why I started learning Backbone the other day. How did a comparison between Angular and Ember spur you into learning Backbone? Just curious since I also started picking it up recently.
|
# ¿ Dec 7, 2013 16:55 |
|
|
# ¿ May 22, 2024 10:43 |
|
Is there any way to adjust the bounding box of images/svgs to be non-rectangular? Right now, I have a bunch of pngs that look like triangles because of transparent backgrounds, but still have a rectangular bounding box. This is proving problematic because I want to put click events on these 'triangles', but since they have rectangular bounding boxes, when I click on one, it actually ends up hitting a nearby triangle instead of the one I want, since there is some overlap. I've looked into setting the clip-path, but from what I've seen/tried, it's still a rectangular bounding box.
|
# ¿ Sep 22, 2014 19:23 |
|
Kekekela posted:3) Consider Linux. I'm a lifelong Windows guy, but god its so much easier to use a lot of the command line based tools in Ubuntu. After developing on a Mac for 2 years and being forced to recently switch back to Windows for my dev environment, I can't agree with this enough.
|
# ¿ Mar 6, 2015 21:31 |
|
Thermopyle posted:It's so true that I do 100% of my development in an Ubuntu VM on my Windows machine. As a bonus, Its nice to be able to move my dev "machine" around very easily. I'm doing .NET stuff now, and as far as I'm aware I'm under the impression that I should be using Visual Studio on Windows. If I'm wrong about this, please tell me because I'm looking for any excuse to use an actual terminal again
|
# ¿ Mar 6, 2015 21:42 |
|
I'm trying to attach an event handler to each of my Tile components in React. This is exactly how the docs say to do it, but I get "Uncaught TypeError: Cannot read property 'bind' of undefined" when I try this. What am I doing wrong? code:
Actually, I have a different problem now. The code runs, but nothing's happening when I click on a tile. I have some other click handlers that are on the Tile component which fire off just fine, but the one bound to the TileList isn't doing anything... enthe0s fucked around with this message at 05:04 on Apr 19, 2015 |
# ¿ Apr 19, 2015 04:54 |
|
https://jsfiddle.net/69z2wepo/6685/ I left out some stuff I don't really think is relevant, but I can edit and include them if necessary.
|
# ¿ Apr 19, 2015 21:21 |
|
Lumpy posted:You never set an onClick on your TileList, so no click on it is handled. I'm not sure if that's what you mean though. Also, I'm on my phone now so I might be missing something Yeah this is my first project with React, so it's very messy. I originally was going to have each Tile remember its state, but then I realized after going down that route that it doesn't make sense since I have to manage the state of 2 tiles to see if they are a match. So now I'm trying to get the TileList to manage the state with these click handlers. I don't think I need to attach an onClick to the TileList itself. My thinking is that each Tile should have an onClick, which sends some info to the TileList so that it can manage the state of different Tiles. That's why I gave each Tile an onClick (line 50) and I thought that it would be handled by the onClick function defined on line 34. Isn't that what's happening in the example in the docs? https://facebook.github.io/react/tips/communicate-between-components.html e: new page so here's the fiddle again so you don't have to go back and forth: https://jsfiddle.net/69z2wepo/6685/
|
# ¿ Apr 21, 2015 15:09 |
|
|
# ¿ May 22, 2024 10:43 |
|
Lumpy posted:Gotcha. Here's a pared down version of your code where the Tile objects call their own _handleClick and check to see if they got something to call from their parent. If so, they call it, passing all their data back up: https://jsfiddle.net/69z2wepo/6789/ This makes so much sense now, Thanks!
|
# ¿ Apr 23, 2015 02:43 |