@flexem/fc-gui 3.0.0-alpha.92 → 3.0.0-alpha.94

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -153,28 +153,34 @@ export class HistoricalCurveElement extends ConditionalDisplayElement {
153
153
  }
154
154
  initPoint() {
155
155
  try {
156
- this.rootElement
157
- .selectAll('.nv-scatterWrap')
158
- .selectAll('.nv-point')
159
- .style('stroke-opacity', 0)
160
- .style('stroke-width', 0);
161
- const legendList = this.rootElement
162
- .selectAll('.nv-legend')
163
- .selectAll('.nv-series');
156
+ const legendList = this.$element
157
+ .find('.nv-legend')
158
+ .find('.nv-series');
164
159
  let hiddenCount = 0;
165
160
  for (let i = 0; i < this.data.length; i++) {
166
161
  const channel = this.model.dataSetting.channels[i];
167
- const pointStyle = `stroke-opacity: 1;stroke-width: 8px;stroke :${channel.pointColor}`;
168
- if (legendList._groups[0][i].firstChild.style.fillOpacity === '1') {
169
- const pointList = this.rootElement
170
- .selectAll('.nv-scatterWrap')
171
- .selectAll('.nv-series-' + (i - hiddenCount)).selectAll('.nv-point')._groups[0];
162
+ if (legendList.eq(i).children().eq(0).css('fill-opacity') === '1') {
163
+ const pointList = this.$element
164
+ .find('.nv-scatterWrap')
165
+ .find('.nv-series-' + (i - hiddenCount))
166
+ .find('.nv-point');
172
167
  if (pointList && pointList.length) {
173
168
  for (let j = 0; j < pointList.length; j++) {
174
- if (j && $(pointList[j]).attr('transform').split(',')[1] !== $(pointList[j - 1]).attr('transform').split(',')[1]) {
169
+ const point = pointList.eq(j);
170
+ const previousPoint = pointList.eq(j - 1);
171
+ if (j && point.attr('transform').split(',')[1] !== previousPoint.attr('transform').split(',')[1]) {
175
172
  if (channel.enablePoint && channel.pointColor) {
176
- pointList[j].setAttribute('style', pointStyle);
177
- pointList[j - 1].setAttribute('style', pointStyle);
173
+ const pointStyle = {
174
+ 'stroke-opacity': 1,
175
+ 'stroke-width': '2px',
176
+ 'stroke': channel.pointColor,
177
+ 'fill-opacity': 1,
178
+ 'fill': channel.pointColor
179
+ };
180
+ point.addClass('nv-mark-point');
181
+ point.css(pointStyle);
182
+ previousPoint.addClass('nv-mark-point');
183
+ previousPoint.css(pointStyle);
178
184
  }
179
185
  }
180
186
  }
@@ -207,6 +213,13 @@ export class HistoricalCurveElement extends ConditionalDisplayElement {
207
213
  this.initPoint();
208
214
  chart.legend.dispatch.on('legendClick', () => {
209
215
  setTimeout(() => {
216
+ this.$element.find('.nv-mark-point').css({
217
+ 'stroke-opacity': 0,
218
+ 'stroke-width': 0,
219
+ 'stroke': 'unset',
220
+ 'fill-opacity': 0,
221
+ 'fill': 'unset'
222
+ }).removeClass('nv-mark-point');
210
223
  this.initPoint();
211
224
  }, 1);
212
225
  });
@@ -253,11 +266,18 @@ export class HistoricalCurveElement extends ConditionalDisplayElement {
253
266
  chart.tooltip.headerFormatter(d => this.timeFormat(d, '%x %X'));
254
267
  if (this.model.displaySetting.showAxis) {
255
268
  chart.xAxis.showMaxMin(true).tickFormat(d => {
269
+ this.$element.find('.nv-mark-point').css({
270
+ 'stroke-opacity': 0,
271
+ 'stroke-width': 0,
272
+ 'stroke': 'unset',
273
+ 'fill-opacity': 0,
274
+ 'fill': 'unset'
275
+ }).removeClass('nv-mark-point');
256
276
  clearTimeout(this.timer);
257
277
  this.timer = undefined;
258
278
  this.timer = setTimeout(() => {
259
279
  this.initPoint();
260
- }, 1);
280
+ }, 100);
261
281
  if (this.currentTimePeriod === 3 || this.currentTimePeriod === 4 || this.currentTimePeriod === 5) {
262
282
  return this.timeFormat(d, '%y-%m-%d');
263
283
  }
@@ -113,7 +113,12 @@ export class VideoElement extends ConditionalDisplayElement {
113
113
  else if (isIos) {
114
114
  this.setIosVideo(this.videoUrl, videoId);
115
115
  }
116
- this.videoPlayer = new EZUIPlayer(videoId);
116
+ try {
117
+ this.videoPlayer = new EZUIPlayer(videoId);
118
+ }
119
+ catch (err) {
120
+ console.log(err);
121
+ }
117
122
  }, 1000);
118
123
  const style = document.createElement('style');
119
124
  style.innerHTML = `#${videoId}::-webkit-media-controls-enclosure {
@@ -110,13 +110,24 @@ let WriteValueModalComponent = class WriteValueModalComponent {
110
110
  value = this.formatWriteValue();
111
111
  }
112
112
  }
113
+ if (!this.args.releasedVariableService) {
114
+ this.onClosed({
115
+ value: value,
116
+ showValue: showValue,
117
+ enableNumericalOperation: false,
118
+ isNumericalOperation: this.isNumericalOperation,
119
+ variableRwType: 6
120
+ });
121
+ return;
122
+ }
113
123
  this.args.releasedVariableService.getVariableWithValueTransform(this.variableName).subscribe(result => {
114
124
  const valueTransform = JSON.parse(result.valueTransform);
115
125
  if (valueTransform.Type !== 0) {
116
126
  this.isNumericalOperation = true;
117
127
  }
118
128
  this.onClosed({
119
- value, showValue,
129
+ value: value,
130
+ showValue: showValue,
120
131
  enableNumericalOperation: this.enableNumericalOperation,
121
132
  isNumericalOperation: this.isNumericalOperation,
122
133
  variableRwType: result.variableRwType
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "main": "bundles/fc-gui.umd.js",
3
- "version": "3.0.0-alpha.92",
3
+ "version": "3.0.0-alpha.94",
4
4
  "module": "public_api.js",
5
5
  "typings": "public_api.d.ts",
6
6
  "license": "UNLICENSED",