Skip to content
This repository has been archived by the owner on Jul 29, 2019. It is now read-only.

Fix image with borders #2599

Merged
merged 1 commit into from
Jan 24, 2017
Merged

Fix image with borders #2599

merged 1 commit into from
Jan 24, 2017

Conversation

denkiwakame
Copy link
Contributor

@denkiwakame denkiwakame commented Jan 18, 2017

image with borders functionality has a bug to fix.
See the following network example:
http://visjs.org/examples/network/nodeStyles/imagesWithBorders.html

Uncaught TypeError: Cannot read property 'borderDashes' of undefined
    at Image.enableBorderDashes (vis.js:36032)
    at Image.draw (vis.js:37207)
    at Node.draw (vis.js:34480)
    at CanvasRenderer._drawNodes (vis.js:43900)
    at CanvasRenderer._redraw (vis.js:43814)
    at vis.js:43763

It seemed enableBorderDashes() checks values.borderDashes at NodeBase.js,
https://github.com/almende/vis/blob/develop/lib/network/modules/components/nodes/util/NodeBase.js#L63..L92
however, the function is not called with values at shapes/Image.js.

I have fixed it and confirmed imageWithBorders example worked well.

fixes #2609 ?

@eymiha
Copy link
Contributor

eymiha commented Jan 18, 2017

Thanks @mojoaxel, this one was my fault.

Copy link
Member

@Tooa Tooa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works! Thank you!

@yotamberk yotamberk merged commit f1bd8ce into almende:develop Jan 24, 2017
@denkiwakame
Copy link
Contributor Author

Thank you for the review !

@denkiwakame denkiwakame deleted the fix-nw-image-with-borders branch January 26, 2017 00:47
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants