-
Notifications
You must be signed in to change notification settings - Fork 1.5k
fix(network) selected image: setting image doesn't affect current image #2894
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,12 +26,22 @@ class CircleImageBase extends NodeBase { | |
} | ||
|
||
setImages(imageObj, imageObjAlt) { | ||
if (imageObj) { | ||
this.imageObj = imageObj; | ||
if (!this.selected) { | ||
if (imageObj) { | ||
this.imageObj = imageObj; | ||
|
||
if (imageObjAlt) { | ||
this.imageObjAlt = imageObjAlt; | ||
if (imageObjAlt) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
This also applies to the uses of There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If I remove those checks and create an image node only containing an There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Well, yes, the code needs to be rearranged somewhat.
If you mean that I create another PR to fix this, that's perfectly fine with me. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes please. I don't feel like refactoring the codebase myself. I'm too used to TypeScript now :) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. OK fine.
Oh, you lucky bastard. I'm itching to go there. There is no hope for TypeScript in Thank you sincerely for your effort here. The bug is genuine and it needs to be tackled. All the best! There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
I understand that it would be an important update but maybe would it bring There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Oh yes, definitely. That is actually an active discussion between the admins here 😄. Let's hope something good will come out of that! |
||
this.imageObjAlt = imageObjAlt; | ||
} | ||
} | ||
|
||
// if node currently selected keep current image | ||
} else if (imageObjAlt) { | ||
this.imageObj = imageObjAlt; | ||
this.imageObjAlt = imageObj; | ||
|
||
} else { | ||
this.imageObj = imageObj; | ||
} | ||
} | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: imageObj must always be defined on the call of this method. For the intent of your code changes, you can assume this is so.