MCPcopy Index your code
hub / github.com/SuperMap/iClient-JavaScript / createTicks

Function createTicks

libs/echarts/echarts.simple.js:40852–40886  ·  view source on GitHub ↗
(ticksCoords, tickTransform, tickEndCoord, tickLineStyle, aniid)

Source from the content-addressed store, hash-verified

40850
40851
40852function createTicks(ticksCoords, tickTransform, tickEndCoord, tickLineStyle, aniid) {
40853 var tickEls = [];
40854 var pt1 = [];
40855 var pt2 = [];
40856 for (var i = 0; i < ticksCoords.length; i++) {
40857 var tickCoord = ticksCoords[i].coord;
40858
40859 pt1[0] = tickCoord;
40860 pt1[1] = 0;
40861 pt2[0] = tickCoord;
40862 pt2[1] = tickEndCoord;
40863
40864 if (tickTransform) {
40865 applyTransform(pt1, pt1, tickTransform);
40866 applyTransform(pt2, pt2, tickTransform);
40867 }
40868 // Tick line, Not use group transform to have better line draw
40869 var tickEl = new Line({
40870 // Id for animation
40871 anid: aniid + '_' + ticksCoords[i].tickValue,
40872 subPixelOptimize: true,
40873 shape: {
40874 x1: pt1[0],
40875 y1: pt1[1],
40876 x2: pt2[0],
40877 y2: pt2[1]
40878 },
40879 style: tickLineStyle,
40880 z2: 2,
40881 silent: true
40882 });
40883 tickEls.push(tickEl);
40884 }
40885 return tickEls;
40886}
40887
40888function buildAxisMajorTicks(axisBuilder, axisModel, opt) {
40889 var axis = axisModel.axis;

Callers 2

buildAxisMajorTicksFunction · 0.70
buildAxisMinorTicksFunction · 0.70

Calls 2

pushMethod · 0.80
applyTransformFunction · 0.70

Tested by

no test coverage detected