CHANGED:applied the autoResize/dashline function with requirement