Skip to content
This repository has been archived by the owner on Nov 13, 2020. It is now read-only.

Parse Dash Pattern #44

Closed
wants to merge 3 commits into from
Closed

Parse Dash Pattern #44

wants to merge 3 commits into from

Conversation

onealj
Copy link

@onealj onealj commented Apr 8, 2015

I'd like to validate a dash pattern that I'm giving to JGraph, and it makes most sense for this validation to be done inside JGraph in case the number separator (currently space) or number type (currently float) changes in the future (the former is not available as a style constant).

It looks like com.mxgraph.canvas.mxGraphics2DCanvas could also be refactored to use this mxUtils.parseDashPattern

float[] dashPattern = mxUtils.getFloatArray(style,

String[] tokens = value.split(" ");

I was not sure what behavior mxUtils.parseDashPattern should take on when the dash pattern string is null or empty string, whether it return the JGraph default dash pattern (

protected float[] dashPattern = { 3, 3 };
), an empty float array, null, or throw an exception.

@alderg
Copy link
Contributor

alderg commented Jun 5, 2015

Thanks, this will be added in the next release.

@alderg alderg closed this Jun 5, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
2 participants