conflict_resolution
stringlengths 27
16k
|
---|
<<<<<<<
import MatrixClientPeg from '../../../MatrixClientPeg';
import sdk from '../../../index';
=======
import {MatrixClientPeg} from '../../../MatrixClientPeg';
import {verificationMethods} from 'matrix-js-sdk/src/crypto';
import * as sdk from '../../../index';
import Modal from "../../../Modal";
>>>>>>>
import {MatrixClientPeg} from '../../../MatrixClientPeg';
import * as sdk from '../../../index'; |
<<<<<<<
invitedEmail={invitedEmail}
=======
room={this.state.room}
>>>>>>>
invitedEmail={invitedEmail}
room={this.state.room}
<<<<<<<
invitedEmail={invitedEmail}
canPreview={this.state.canPeek}
=======
room={this.state.room}
/>
);
}
else if (!myMember || myMember.membership !== "join") {
aux = (
<RoomPreviewBar onJoinClick={this.onJoinButtonClicked} canJoin={true}
spinner={this.state.joining} canPreview={ this.state.canPeek }
room={this.state.room}
>>>>>>>
invitedEmail={invitedEmail}
canPreview={this.state.canPeek}
room={this.state.room} |
<<<<<<<
{ id: "pinMentionedRooms" },
{ id: "pinUnreadRooms" },
=======
{ id: "showDeveloperTools" },
>>>>>>>
{ id: "pinMentionedRooms" },
{ id: "pinUnreadRooms" },
{ id: "showDeveloperTools" }, |
<<<<<<<
const UpdateCheckBar = sdk.getComponent('globals.UpdateCheckBar');
=======
const PasswordNagBar = sdk.getComponent('globals.PasswordNagBar');
>>>>>>>
const UpdateCheckBar = sdk.getComponent('globals.UpdateCheckBar');
const PasswordNagBar = sdk.getComponent('globals.PasswordNagBar');
<<<<<<<
let topBar;
=======
const isGuest = this.props.matrixClient.isGuest();
var topBar;
>>>>>>>
let topBar;
const isGuest = this.props.matrixClient.isGuest();
<<<<<<<
} else if (this.props.checkingForUpdate) {
topBar = <UpdateCheckBar {...this.props.checkingForUpdate} />;
} else if (this.props.matrixClient.isGuest()) {
topBar = <GuestWarningBar />;
} else if (Notifier.supportsDesktopNotifications() && !Notifier.isEnabled() && !Notifier.isToolbarHidden()) {
=======
} else if (this.state.userHasGeneratedPassword) {
topBar = <PasswordNagBar />;
} else if (!isGuest && Notifier.supportsDesktopNotifications() && !Notifier.isEnabled() && !Notifier.isToolbarHidden()) {
>>>>>>>
} else if (this.props.checkingForUpdate) {
topBar = <UpdateCheckBar {...this.props.checkingForUpdate} />;
} else if (this.state.userHasGeneratedPassword) {
topBar = <PasswordNagBar />;
} else if (!isGuest && Notifier.supportsDesktopNotifications() && !Notifier.isEnabled() && !Notifier.isToolbarHidden()) { |
<<<<<<<
static getRoomWidgets(room: Room) {
=======
static getRoomWidgets(room) {
// TODO: Enable support for m.widget event type (https://github.com/vector-im/riot-web/issues/13111)
>>>>>>>
static getRoomWidgets(room: Room) {
// TODO: Enable support for m.widget event type (https://github.com/vector-im/riot-web/issues/13111) |
<<<<<<<
"feature_mjolnir": {
isFeature: true,
displayName: _td("Try out new ways to ignore people (experimental)"),
supportedLevels: LEVELS_FEATURE,
default: false,
},
"mjolnirRooms": {
supportedLevels: ['account'],
default: [],
},
"mjolnirPersonalRoom": {
supportedLevels: ['account'],
default: null,
},
"feature_dm_verification": {
isFeature: true,
displayName: _td("Send verification requests in direct message," +
" including a new verification UX in the member panel."),
supportedLevels: LEVELS_FEATURE,
default: false,
},
"feature_cross_signing": {
isFeature: true,
displayName: _td("Enable cross-signing to verify per-user instead of per-device"),
supportedLevels: LEVELS_FEATURE,
default: false,
controller: new ReloadOnChangeController(),
},
=======
"feature_event_indexing": {
isFeature: true,
supportedLevels: LEVELS_FEATURE,
displayName: _td("Enable local event indexing and E2EE search (requires restart)"),
default: false,
},
>>>>>>>
"feature_mjolnir": {
isFeature: true,
displayName: _td("Try out new ways to ignore people (experimental)"),
supportedLevels: LEVELS_FEATURE,
default: false,
},
"mjolnirRooms": {
supportedLevels: ['account'],
default: [],
},
"mjolnirPersonalRoom": {
supportedLevels: ['account'],
default: null,
},
"feature_dm_verification": {
isFeature: true,
displayName: _td("Send verification requests in direct message," +
" including a new verification UX in the member panel."),
supportedLevels: LEVELS_FEATURE,
default: false,
},
"feature_cross_signing": {
isFeature: true,
displayName: _td("Enable cross-signing to verify per-user instead of per-device"),
supportedLevels: LEVELS_FEATURE,
default: false,
controller: new ReloadOnChangeController(),
},
"feature_event_indexing": {
isFeature: true,
supportedLevels: LEVELS_FEATURE,
displayName: _td("Enable local event indexing and E2EE search (requires restart)"),
default: false,
}, |
<<<<<<<
selectedOptions,
filteredOptions,
isOpen
=======
selectedWords: this.state.selectedWords,
filteredWords: this.state.filteredWords,
isSuggestionsOpened: this.state.isSuggestionsOpened,
highlightedOptionIndex: this.state.highlightedOptionIndex,
maxSelections: this.props.maxSelections,
maxVisibleSuggestions: this.props.maxVisibleSuggestions,
dropdownParams: this.state.dropdownParams,
>>>>>>>
selectedOptions,
filteredOptions,
isOpen,
<<<<<<<
=======
_getDocumentEvents () {
return {
click: this._handleDocumentClick,
scroll: this.closeSuggestions,
};
}
>>>>>>> |
<<<<<<<
// $FlowFixMe
import type { Ref, ComponentType, SyntheticKeyboardEvent, SyntheticMouseEvent, SyntheticEvent, Element } from 'react';
// internal components
import { withTheme } from './HOC/withTheme';
=======
import type {
ComponentType,
// $FlowFixMe
SyntheticKeyboardEvent,
// $FlowFixMe
SyntheticMouseEvent,
// $FlowFixMe
SyntheticEvent,
Element,
Ref
} from 'react';
import createRef from 'create-react-ref/lib/createRef';
>>>>>>>
// internal components
import { withTheme } from './HOC/withTheme';
import type {
ComponentType,
// $FlowFixMe
SyntheticKeyboardEvent,
// $FlowFixMe
SyntheticMouseEvent,
// $FlowFixMe
SyntheticEvent,
Element,
Ref
} from 'react';
import createRef from 'create-react-ref/lib/createRef';
<<<<<<<
theme: Object, // if passed by user, it will take precedence over this.props.context.theme
=======
targetRef: Ref<*> ,
theme: Object, // will take precedence over theme in context if passed
>>>>>>>
targetRef: Ref<*>,
theme: Object, // if passed by user, it will take precedence over this.props.context.theme
<<<<<<<
=======
optionsElement: ?Element<any>;
>>>>>>>
optionsElement: ?Element<any>;
<<<<<<<
=======
targetRef={targetRef}
optionsRef={this.optionsElement}
theme={composedTheme}
isOpen={isOpen}
highlightedOptionIndex={highlightedOptionIndex}
>>>>>>> |
<<<<<<<
"m.room.encryption": _td("Enable room encryption"),
=======
"m.room.tombstone": _td("Upgrade the room"),
>>>>>>>
"m.room.tombstone": _td("Upgrade the room"),
"m.room.encryption": _td("Enable room encryption"),
<<<<<<<
"m.room.encryption": {isState: true},
=======
"m.room.tombstone": {isState: true},
>>>>>>>
"m.room.tombstone": {isState: true},
"m.room.encryption": {isState: true}, |
<<<<<<<
const crossSigningReady = await cli.isCrossSigningReady();
=======
const secretStorageKeyNeedsUpgrade = await cli.secretStorageKeyNeedsUpgrade();
>>>>>>>
const crossSigningReady = await cli.isCrossSigningReady();
const secretStorageKeyNeedsUpgrade = await cli.secretStorageKeyNeedsUpgrade();
<<<<<<<
crossSigningReady,
=======
secretStorageKeyNeedsUpgrade,
>>>>>>>
crossSigningReady,
secretStorageKeyNeedsUpgrade,
<<<<<<<
crossSigningReady,
=======
secretStorageKeyNeedsUpgrade,
>>>>>>>
crossSigningReady,
secretStorageKeyNeedsUpgrade, |
<<<<<<<
import createRoom from "../../../createRoom";
import {inviteMultipleToRoom} from "../../../RoomInvite";
=======
import {humanizeTime} from "../../../utils/humanize";
>>>>>>>
import {humanizeTime} from "../../../utils/humanize";
import createRoom from "../../../createRoom";
import {inviteMultipleToRoom} from "../../../RoomInvite"; |
<<<<<<<
import {containsEmoji} from "../elements/effects/effectUtilities";
import effects from '../elements/effects';
=======
import SettingsStore from "../../../settings/SettingsStore";
import CountlyAnalytics from "../../../CountlyAnalytics";
>>>>>>>
import {containsEmoji} from "../elements/effects/effectUtilities";
import effects from '../elements/effects';
import SettingsStore from "../../../settings/SettingsStore";
import CountlyAnalytics from "../../../CountlyAnalytics";
<<<<<<<
effects.forEach((effect) => {
if (containsEmoji(content, effect.emojis)) {
dis.dispatch({action: `effects.${effect.command}`});
}
});
=======
CountlyAnalytics.instance.trackSendMessage(startTime, prom, roomId, false, !!replyToEvent, content);
>>>>>>>
effects.forEach((effect) => {
if (containsEmoji(content, effect.emojis)) {
dis.dispatch({action: `effects.${effect.command}`});
}
});
CountlyAnalytics.instance.trackSendMessage(startTime, prom, roomId, false, !!replyToEvent, content); |
<<<<<<<
const lists = this.getRoomLists();
let totalRooms = 0;
for (const l of Object.values(lists)) {
totalRooms += l.length;
}
this.setState({
lists: this.getRoomLists(),
totalRoomCount: totalRooms,
});
=======
this.setState(this.getRoomLists());
>>>>>>>
const lists = this.getRoomLists();
let totalRooms = 0;
for (const l of Object.values(lists)) {
totalRooms += l.length;
}
this.setState({
lists: this.getRoomLists(),
totalRoomCount: totalRooms,
});
<<<<<<<
if (lists["im.vector.fake.direct"].length == 0 &&
MatrixClientPeg.get().getAccountData('m.direct') === undefined &&
!MatrixClientPeg.get().isGuest())
{
// scan through the 'recents' list for any rooms which look like DM rooms
// and make them DM rooms
const oldRecents = lists["im.vector.fake.recent"];
lists["im.vector.fake.recent"] = [];
for (const room of oldRecents) {
const me = room.getMember(MatrixClientPeg.get().credentials.userId);
if (me && Rooms.looksLikeDirectMessageRoom(room, me)) {
self.listsForRoomId[room.roomId].push("im.vector.fake.direct");
lists["im.vector.fake.direct"].push(room);
} else {
self.listsForRoomId[room.roomId].push("im.vector.fake.recent");
lists["im.vector.fake.recent"].push(room);
}
}
// save these new guessed DM rooms into the account data
const newMDirectEvent = {};
for (const room of lists["im.vector.fake.direct"]) {
const me = room.getMember(MatrixClientPeg.get().credentials.userId);
const otherPerson = Rooms.getOnlyOtherMember(room, me);
if (!otherPerson) continue;
const roomList = newMDirectEvent[otherPerson.userId] || [];
roomList.push(room.roomId);
newMDirectEvent[otherPerson.userId] = roomList;
}
console.warn("Resetting room DM state to be " + JSON.stringify(newMDirectEvent));
// if this fails, fine, we'll just do the same thing next time we get the room lists
MatrixClientPeg.get().setAccountData('m.direct', newMDirectEvent).done();
}
//console.log("calculated new roomLists; im.vector.fake.recent = " + s.lists["im.vector.fake.recent"]);
=======
>>>>>>> |
<<<<<<<
=======
_initialiseMessagePanel: function() {
var messagePanel = ReactDOM.findDOMNode(this.refs.messagePanel);
this.refs.messagePanel.initialised = true;
this.updateTint();
},
componentDidUpdate: function() {
// we need to initialise the messagepanel if we've just joined the
// room. TODO: we really really ought to factor out messagepanel to a
// separate component to avoid this ridiculous dance.
if (!this.refs.messagePanel) return;
if (this.refs.roomView) {
var roomView = ReactDOM.findDOMNode(this.refs.roomView);
if (!roomView.ondrop) {
roomView.addEventListener('drop', this.onDrop);
roomView.addEventListener('dragover', this.onDragOver);
roomView.addEventListener('dragleave', this.onDragLeaveOrEnd);
roomView.addEventListener('dragend', this.onDragLeaveOrEnd);
}
}
if (!this.refs.messagePanel.initialised) {
this._initialiseMessagePanel();
}
},
_onTimelineUpdated: function(gotResults) {
// we might have switched rooms since the load started - just bin
// the results if so.
if (this.unmounted) return;
this.setState({
paginating: false,
});
if (gotResults) {
this.setState({
events: this._timelineWindow.getEvents(),
canBackPaginate: this._timelineWindow.canPaginate(EventTimeline.BACKWARDS),
});
}
},
>>>>>>>
componentDidUpdate: function() {
if (this.refs.roomView) {
var roomView = ReactDOM.findDOMNode(this.refs.roomView);
if (!roomView.ondrop) {
roomView.addEventListener('drop', this.onDrop);
roomView.addEventListener('dragover', this.onDragOver);
roomView.addEventListener('dragleave', this.onDragLeaveOrEnd);
roomView.addEventListener('dragend', this.onDragLeaveOrEnd);
}
}
}, |
<<<<<<<
if (this.props.roomId) {
Invite.inviteToRoom(this.props.roomId, addr).catch(function(err) {
var ErrorDialog = sdk.getComponent("dialogs.ErrorDialog");
Modal.createDialog(ErrorDialog, {
title: "Failure to invite user",
description: err.toString()
});
return null;
})
.done();
} else {
// Start the chat
createRoom().then(function(roomId) {
return Invite.inviteToRoom(roomId, addr);
})
.catch(function(err) {
var ErrorDialog = sdk.getComponent("dialogs.ErrorDialog");
Modal.createDialog(ErrorDialog, {
title: "Failure to invite user",
description: err.toString()
});
return null;
})
.done();
}
=======
// Start the chat
createRoom({dmUserId: addr})
.catch(function(err) {
var ErrorDialog = sdk.getComponent("dialogs.ErrorDialog");
Modal.createDialog(ErrorDialog, {
title: "Failure to invite user",
description: err.toString()
});
return null;
})
.done();
>>>>>>>
if (this.props.roomId) {
Invite.inviteToRoom(this.props.roomId, addr).catch(function(err) {
var ErrorDialog = sdk.getComponent("dialogs.ErrorDialog");
Modal.createDialog(ErrorDialog, {
title: "Failure to invite user",
description: err.toString()
});
return null;
})
.done();
} else {
// Start the chat
createRoom().then(function(roomId) {
return Invite.inviteToRoom(roomId, addr);
})
.catch(function(err) {
var ErrorDialog = sdk.getComponent("dialogs.ErrorDialog");
Modal.createDialog(ErrorDialog, {
title: "Failure to invite user",
description: err.toString()
});
return null;
})
.done();
}
// // Start the chat
// createRoom({dmUserId: addr})
// .catch(function(err) {
// var ErrorDialog = sdk.getComponent("dialogs.ErrorDialog");
// Modal.createDialog(ErrorDialog, {
// title: "Failure to invite user",
// description: err.toString()
// });
// return null;
// })
// .done(); |
<<<<<<<
onScroll: function(ev) {
if (this.props.resizeNotifier.isResizing) return; // skip scroll events caused by resizing
=======
onScroll = ev => {
>>>>>>>
onScroll = ev => {
if (this.props.resizeNotifier.isResizing) return; // skip scroll events caused by resizing
<<<<<<<
onResize: function() {
debuglog("onResize");
=======
onResize = () => {
>>>>>>>
onResize = () => {
debuglog("onResize");
<<<<<<<
},
=======
};
>>>>>>>
}; |
<<<<<<<
function getDaysArray() {
return [
_t('Sun'),
_t('Mon'),
_t('Tue'),
_t('Wed'),
_t('Thu'),
_t('Fri'),
_t('Sat'),
];
}
function getMonthsArray() {
return [
_t('Jan'),
_t('Feb'),
_t('Mar'),
_t('Apr'),
_t('May'),
_t('Jun'),
_t('Jul'),
_t('Aug'),
_t('Sep'),
_t('Oct'),
_t('Nov'),
_t('Dec'),
];
}
=======
const days = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"];
const months = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
>>>>>>>
function getDaysArray() {
return [
_t('Sun'),
_t('Mon'),
_t('Tue'),
_t('Wed'),
_t('Thu'),
_t('Fri'),
_t('Sat'),
];
}
function getMonthsArray() {
return [
_t('Jan'),
_t('Feb'),
_t('Mar'),
_t('Apr'),
_t('May'),
_t('Jun'),
_t('Jul'),
_t('Aug'),
_t('Sep'),
_t('Oct'),
_t('Nov'),
_t('Dec'),
];
}
<<<<<<<
// date.toLocaleTimeString is completely system dependent.
// just go 24h for now
const days = getDaysArray();
const months = getMonthsArray();
// TODO: use standard date localize function provided in counterpart
var hoursAndMinutes = pad(date.getHours()) + ':' + pad(date.getMinutes());
=======
>>>>>>>
<<<<<<<
return hoursAndMinutes;
=======
return this.formatTime(date);
>>>>>>>
return this.formatTime(date);
<<<<<<<
// TODO: use standard date localize function provided in counterpart
return _t('%(weekDayName)s %(time)s', {weekDayName: days[date.getDay()], time: hoursAndMinutes});
=======
return days[date.getDay()] + " " + this.formatTime(date);
>>>>>>>
// TODO: use standard date localize function provided in counterpart
return _t('%(weekDayName)s %(time)s', {weekDayName: days[date.getDay()], time: this.formatTime(date)});
<<<<<<<
// TODO: use standard date localize function provided in counterpart
return _t('%(weekDayName)s, %(monthName)s %(day)s %(time)s', {weekDayName: days[date.getDay()], monthName: months[date.getMonth()], day: date.getDate(), time: hoursAndMinutes});
}
else {
return this.formatFullDate(date);
=======
return days[date.getDay()] + ", " + months[date.getMonth()] + " " + date.getDate() + " " + this.formatTime(date);
>>>>>>>
// TODO: use standard date localize function provided in counterpart
return _t('%(weekDayName)s, %(monthName)s %(day)s %(time)s', {
weekDayName: days[date.getDay()],
monthName: months[date.getMonth()],
day: date.getDate(),
time: this.formatTime(date),
});
<<<<<<<
const days = getDaysArray();
const months = getMonthsArray();
var hoursAndMinutes = pad(date.getHours()) + ':' + pad(date.getMinutes());
return _t('%(weekDayName)s, %(monthName)s %(day)s %(fullYear)s %(time)s', {weekDayName: days[date.getDay()], monthName: months[date.getMonth()], day: date.getDate(), fullYear: date.getFullYear(),time: hoursAndMinutes});
=======
return days[date.getDay()] + ", " + months[date.getMonth()] + " " + date.getDate() + " " + date.getFullYear() + " " + this.formatTime(date);
>>>>>>>
const days = getDaysArray();
const months = getMonthsArray();
return _t('%(weekDayName)s, %(monthName)s %(day)s %(fullYear)s %(time)s', {
weekDayName: days[date.getDay()],
monthName: months[date.getMonth()],
day: date.getDate(),
fullYear: date.getFullYear(),
time: this.formatTime(date),
});
<<<<<<<
}
};
=======
},
};
>>>>>>>
},
}; |
<<<<<<<
can: {
...defaultPerms.can,
...await this._calculateCanPermissions(me, them, powerLevels.getContent()),
},
=======
can: await this._calculateCanPermissions(
me, them, powerLevels.getContent(),
),
>>>>>>>
can: {
...defaultPerms.can,
...await this._calculateCanPermissions(me, them, powerLevels.getContent()),
},
<<<<<<<
=======
// Calculate permissions for Synapse before doing the PL checks
can.synapseDeactivate = await this.context.matrixClient.isSynapseAdministrator();
>>>>>>>
// Calculate permissions for Synapse before doing the PL checks
can.synapseDeactivate = await this.context.matrixClient.isSynapseAdministrator(); |
<<<<<<<
const {request} = this.props;
if (request.ready || request.started || request.done || request.cancelled || request.observeOnly) {
this.props.dismiss();
=======
if (!this.props.requestObserver.pending) {
ToastStore.sharedInstance().dismissToast(this.props.toastKey);
>>>>>>>
const {request} = this.props;
if (request.ready || request.started || request.done || request.cancelled || request.observeOnly) {
ToastStore.sharedInstance().dismissToast(this.props.toastKey);
<<<<<<<
accept = async () => {
this.props.dismiss();
const {request} = this.props;
const {event} = request;
=======
accept = () => {
ToastStore.sharedInstance().dismissToast(this.props.toastKey);
const {event} = this.props.request;
>>>>>>>
accept = async () => {
ToastStore.sharedInstance().dismissToast(this.props.toastKey);
const {request} = this.props;
const {event} = request;
<<<<<<<
=======
requestObserver: PropTypes.instanceOf(KeyVerificationStateObserver),
toastKey: PropTypes.string.isRequired,
>>>>>>>
toastKey: PropTypes.string.isRequired, |
<<<<<<<
import {RoomListStoreTempProxy} from "../../../stores/room-list/RoomListStoreTempProxy";
import {DefaultTagID} from "../../../stores/room-list/models";
=======
import {Action} from "../../../dispatcher/actions";
>>>>>>>
import {Action} from "../../../dispatcher/actions";
import {RoomListStoreTempProxy} from "../../../stores/room-list/RoomListStoreTempProxy";
import {DefaultTagID} from "../../../stores/room-list/models"; |
<<<<<<<
}, [urlsIndex]);
useEventEmitter(cli, "sync", onClientSync);
const imageUrl = imageUrls[urlsIndex];
return [imageUrl, imageUrl === defaultImageUrl, onError];
};
const BaseAvatar = (props) => {
const {
name,
idName,
title,
url,
urls,
width=40,
height=40,
resizeMethod="crop", // eslint-disable-line no-unused-vars
defaultToInitialLetter=true,
onClick,
inputRef,
...otherProps
} = props;
const [imageUrl, isDefault, onError] = useImageUrl({url, urls, idName, name, defaultToInitialLetter});
if (isDefault) {
const initialLetter = AvatarLogic.getInitialLetter(name);
const textNode = (
<span
className="mx_BaseAvatar_initial"
aria-hidden="true"
style={{
fontSize: (width * 0.65) + "px",
width: width + "px",
lineHeight: height + "px",
}}
>
{ initialLetter }
</span>
);
const imgNode = (
<img
className="mx_BaseAvatar_image"
src={imageUrl}
alt=""
title={title}
onError={onError}
width={width}
height={height}
aria-hidden="true" />
);
=======
},
render: function() {
const imageUrl = this.state.imageUrls[this.state.urlsIndex];
const {
name, idName, title, url, urls, width, height, resizeMethod,
defaultToInitialLetter, onClick, inputRef,
...otherProps
} = this.props;
if (imageUrl === this.state.defaultImageUrl) {
const initialLetter = AvatarLogic.getInitialLetter(name);
const textNode = (
<span className="mx_BaseAvatar_initial" aria-hidden="true"
style={{
fontSize: toRem(width * 0.65),
width: toRem(width),
lineHeight: toRem(height),
}}
>
{ initialLetter }
</span>
);
const imgNode = (
<img className="mx_BaseAvatar_image" src={imageUrl}
alt="" title={title} onError={this.onError}
aria-hidden="true"
style={{
width: toRem(width),
height: toRem(height)
}} />
);
if (onClick != null) {
return (
<AccessibleButton element='span' className="mx_BaseAvatar"
onClick={onClick} inputRef={inputRef} {...otherProps}
>
{ textNode }
{ imgNode }
</AccessibleButton>
);
} else {
return (
<span className="mx_BaseAvatar" ref={inputRef} {...otherProps}>
{ textNode }
{ imgNode }
</span>
);
}
}
>>>>>>>
}, [urlsIndex]);
useEventEmitter(cli, "sync", onClientSync);
const imageUrl = imageUrls[urlsIndex];
return [imageUrl, imageUrl === defaultImageUrl, onError];
};
const BaseAvatar = (props) => {
const {
name,
idName,
title,
url,
urls,
width=40,
height=40,
resizeMethod="crop", // eslint-disable-line no-unused-vars
defaultToInitialLetter=true,
onClick,
inputRef,
...otherProps
} = props;
const [imageUrl, isDefault, onError] = useImageUrl({url, urls, idName, name, defaultToInitialLetter});
if (isDefault) {
const initialLetter = AvatarLogic.getInitialLetter(name);
const textNode = (
<span
className="mx_BaseAvatar_initial"
aria-hidden="true"
style={{
fontSize: toRem(width * 0.65),
width: toRem(width),
lineHeight: toRem(height),
}}
>
{ initialLetter }
</span>
);
const imgNode = (
<img
className="mx_BaseAvatar_image"
src={imageUrl}
alt=""
title={title}
onError={onError}
style={{
width: toRem(width),
height: toRem(height),
}}
aria-hidden="true" />
);
<<<<<<<
=======
onError={this.onError}
style={{
width: toRem(width),
height: toRem(height),
}}
title={title} alt=""
>>>>>>>
<<<<<<<
<span className="mx_BaseAvatar" ref={inputRef} {...otherProps}>
{ textNode }
{ imgNode }
</span>
=======
<img
className="mx_BaseAvatar mx_BaseAvatar_image"
src={imageUrl}
onError={this.onError}
style={{
width: toRem(width),
height: toRem(height),
}}
title={title} alt=""
ref={inputRef}
{...otherProps} />
>>>>>>>
<span className="mx_BaseAvatar" ref={inputRef} {...otherProps}>
{ textNode }
{ imgNode }
</span> |
<<<<<<<
isAlone: false,
=======
isPeeking: false,
>>>>>>>
isAlone: false,
isPeeking: false, |
<<<<<<<
uploadNewState: function(new_name, new_topic, new_join_rule, new_history_visibility, new_power_levels, new_color_scheme) {
=======
uploadNewState: function(newVals) {
>>>>>>>
uploadNewState: function(newVals) {
<<<<<<<
if (old_name != new_name && new_name != undefined) {
=======
if (old_name != newVals.name && newVals.name != undefined && newVals.name) {
>>>>>>>
if (old_name != newVals.name && newVals.name != undefined) {
<<<<<<<
if (new_color_scheme) {
deferreds.push(
MatrixClientPeg.get().setRoomAccountData(
this.state.room.roomId, "org.matrix.room.color_scheme", new_color_scheme
)
);
}
=======
deferreds.push(
MatrixClientPeg.get().setGuestAccess(this.state.room.roomId, {
allowRead: newVals.guest_read,
allowJoin: newVals.guest_join
})
);
>>>>>>>
if (newVals.color_scheme) {
deferreds.push(
MatrixClientPeg.get().setRoomAccountData(
this.state.room.roomId, "org.matrix.room.color_scheme", newVals.color_scheme
)
);
}
deferreds.push(
MatrixClientPeg.get().setGuestAccess(this.state.room.roomId, {
allowRead: newVals.guest_read,
allowJoin: newVals.guest_join
})
);
<<<<<<<
var new_name = this.refs.header.getRoomName();
var new_topic = this.refs.header.getTopic();
var new_join_rule = this.refs.room_settings.getJoinRules();
var new_history_visibility = this.refs.room_settings.getHistoryVisibility();
var new_power_levels = this.refs.room_settings.getPowerLevels();
var new_color_scheme = this.refs.room_settings.getColorScheme();
this.uploadNewState(
new_name,
new_topic,
new_join_rule,
new_history_visibility,
new_power_levels,
new_color_scheme
);
=======
this.uploadNewState({
name: this.refs.header.getRoomName(),
topic: this.refs.room_settings.getTopic(),
join_rule: this.refs.room_settings.getJoinRules(),
history_visibility: this.refs.room_settings.getHistoryVisibility(),
power_levels: this.refs.room_settings.getPowerLevels(),
guest_join: this.refs.room_settings.canGuestsJoin(),
guest_read: this.refs.room_settings.canGuestsRead()
});
>>>>>>>
this.uploadNewState({
name: this.refs.header.getRoomName(),
topic: this.refs.room_settings.getTopic(),
join_rule: this.refs.room_settings.getJoinRules(),
history_visibility: this.refs.room_settings.getHistoryVisibility(),
power_levels: this.refs.room_settings.getPowerLevels(),
guest_join: this.refs.room_settings.canGuestsJoin(),
guest_read: this.refs.room_settings.canGuestsRead(),
color_scheme: this.refs.room_settings.getColorScheme(),
});
<<<<<<<
=======
// header + footer + status + give us at least 100px of scrollback at all times.
auxPanelMaxHeight = window.innerHeight -
(83 + 72 +
sdk.getComponent('rooms.MessageComposer').MAX_HEIGHT +
100);
// XXX: this is a bit of a hack and might possibly cause the video to push out the page anyway
// but it's better than the video going missing entirely
if (auxPanelMaxHeight < 50) auxPanelMaxHeight = 50;
>>>>>>>
// header + footer + status + give us at least 100px of scrollback at all times.
auxPanelMaxHeight = window.innerHeight -
(83 + 72 +
sdk.getComponent('rooms.MessageComposer').MAX_HEIGHT +
100);
// XXX: this is a bit of a hack and might possibly cause the video to push out the page anyway
// but it's better than the video going missing entirely
if (auxPanelMaxHeight < 50) auxPanelMaxHeight = 50;
<<<<<<<
<div className="mx_RoomView_auxPanel" ref="auxPanel">
<CallView ref="callView" room={this.state.room} ConferenceHandler={this.props.ConferenceHandler}/>
=======
<div className="mx_RoomView_auxPanel">
<CallView ref="callView" room={this.state.room} ConferenceHandler={this.props.ConferenceHandler}
onResize={this.onChildResize} />
>>>>>>>
<div className="mx_RoomView_auxPanel" ref="auxPanel">
<CallView ref="callView" room={this.state.room} ConferenceHandler={this.props.ConferenceHandler}
onResize={this.onChildResize} /> |
<<<<<<<
summary: this._groupStore.getSummary(),
isGroupPublicised: this._groupStore.getGroupPublicity(),
isUserPrivileged: this._groupStore.isUserPrivileged(),
=======
summary,
>>>>>>>
summary,
isGroupPublicised: this._groupStore.getGroupPublicity(),
isUserPrivileged: this._groupStore.isUserPrivileged(), |
<<<<<<<
const store = SetupEncryptionStore.sharedInstance();
let recoveryKeyPrompt;
if (store.keyInfo && keyHasPassphrase(store.keyInfo)) {
recoveryKeyPrompt = _t("Use Recovery Key or Passphrase");
} else if (store.keyInfo) {
recoveryKeyPrompt = _t("Use Recovery Key");
}
let useRecoveryKeyButton;
let resetKeysCaption;
if (recoveryKeyPrompt) {
useRecoveryKeyButton = <AccessibleButton kind="link" onClick={this._onUseRecoveryKeyClick}>
{recoveryKeyPrompt}
</AccessibleButton>;
resetKeysCaption = _td(
"If you've forgotten your recovery key you can <button>set up new recovery options</button>",
);
} else {
resetKeysCaption = _td(
"If you have no other devices you can <button>set up new recovery options</button>",
);
}
=======
>>>>>>>
const store = SetupEncryptionStore.sharedInstance();
let recoveryKeyPrompt;
if (store.keyInfo && keyHasPassphrase(store.keyInfo)) {
recoveryKeyPrompt = _t("Use Recovery Key or Passphrase");
} else if (store.keyInfo) {
recoveryKeyPrompt = _t("Use Recovery Key");
}
let useRecoveryKeyButton;
let resetKeysCaption;
if (recoveryKeyPrompt) {
useRecoveryKeyButton = <AccessibleButton kind="link" onClick={this._onUsePassphraseClick}>
{recoveryKeyPrompt}
</AccessibleButton>;
resetKeysCaption = _td(
"If you've forgotten your recovery key you can <button>set up new recovery options</button>",
);
} else {
resetKeysCaption = _td(
"If you have no other devices you can <button>set up new recovery options</button>",
);
}
<<<<<<<
{useRecoveryKeyButton}
=======
<AccessibleButton kind="link" onClick={this._onUsePassphraseClick}>
{_t("Use Recovery Passphrase or Key")}
</AccessibleButton>
>>>>>>>
{useRecoveryKeyButton}
<<<<<<<
<div className="mx_CompleteSecurity_resetText">{_t(resetKeysCaption, {}, {
button: sub => <AccessibleButton
element="span" className="mx_linkButton" onClick={this._onResetClick}
>
{sub}
</AccessibleButton>,
},
)}</div>
=======
>>>>>>> |
<<<<<<<
"feature_custom_tags": {
isFeature: true,
displayName: _td("Group & filter rooms by custom tags (refresh to apply changes)"),
supportedLevels: LEVELS_FEATURE,
default: false,
},
"feature_lazyloading": {
isFeature: true,
displayName: _td("Increase performance by only loading room members on first view"),
supportedLevels: LEVELS_FEATURE,
controller: new LazyLoadingController(),
default: true,
},
=======
>>>>>>>
"feature_custom_tags": {
isFeature: true,
displayName: _td("Group & filter rooms by custom tags (refresh to apply changes)"),
supportedLevels: LEVELS_FEATURE,
default: false,
}, |
<<<<<<<
import PlatformPeg from "../../../../../PlatformPeg";
import MatrixClientPeg from "../../../../../MatrixClientPeg";
import sdk from "../../../../..";
import Modal from "../../../../../Modal";
import dis from "../../../../../dispatcher";
=======
import {THEMES} from "../../../../../themes";
const PlatformPeg = require("../../../../../PlatformPeg");
const MatrixClientPeg = require("../../../../../MatrixClientPeg");
const sdk = require('../../../../..');
const Modal = require("../../../../../Modal");
const dis = require("../../../../../dispatcher");
>>>>>>>
import {THEMES} from "../../../../../themes";
import PlatformPeg from "../../../../../PlatformPeg";
import MatrixClientPeg from "../../../../../MatrixClientPeg";
import sdk from "../../../../..";
import Modal from "../../../../../Modal";
import dis from "../../../../../dispatcher"; |
<<<<<<<
room: React.PropTypes.object.isRequired,
userId: React.PropTypes.string.isRequired,
showApps: React.PropTypes.bool, // Render apps
hideAppsDrawer: React.PropTypes.bool, // Do not display apps drawer and content (may still be rendered)
=======
room: PropTypes.object.isRequired,
userId: PropTypes.string.isRequired,
showApps: PropTypes.bool,
>>>>>>>
room: PropTypes.object.isRequired,
userId: PropTypes.string.isRequired,
showApps: PropTypes.bool, // Render apps
hideAppsDrawer: PropTypes.bool, // Do not display apps drawer and content (may still be rendered) |
<<<<<<<
if (firstScreen === 'login' ||
firstScreen === 'register' ||
firstScreen === 'forgot_password') {
this.props.onLoadCompleted();
this._showScreenAfterLogin();
return;
}
=======
// if the user has followed a login or register link, don't reanimate
// the old creds, but rather go straight to the relevant page
const firstScreen = this.state.screenAfterLogin ?
this.state.screenAfterLogin.screen : null;
>>>>>>>
// if the user has followed a login or register link, don't reanimate
// the old creds, but rather go straight to the relevant page
const firstScreen = this.state.screenAfterLogin ?
this.state.screenAfterLogin.screen : null;
<<<<<<<
this.props.onLoadCompleted();
// if we've got this far without leaving the 'loading' view, then
// login must have failed, so start the login process
if (this.state.view === VIEWS.LOADING) {
dis.dispatch({action: "start_login"});
}
=======
this.setState({loading: false});
>>>>>>>
// if we've got this far without leaving the 'loading' view, then
// login must have failed, so start the login process
if (this.state.view === VIEWS.LOADING) {
dis.dispatch({action: "start_login"});
} |
<<<<<<<
case 'view_user':
// FIXME: ugly hack to expand the RightPanel and then re-dispatch.
if (this.state.collapsedRhs) {
setTimeout(()=>{
dis.dispatch({
action: 'show_right_panel',
});
dis.dispatch({
action: 'view_user',
member: payload.member,
});
}, 0);
}
break;
// different from view_user,
// this show the user panel outside of the context
// of a room, like a /user/<id> url
case 'view_user_info':
this._viewUser(payload.userId);
break;
=======
>>>>>>>
case 'view_user_info':
this._viewUser(payload.userId);
break; |
<<<<<<<
showTopUnreadMessagesBar: false,
=======
auxPanelMaxHeight: undefined,
>>>>>>>
showTopUnreadMessagesBar: false,
auxPanelMaxHeight: undefined,
<<<<<<<
<div className="mx_RoomView_auxPanel" ref="auxPanel">
{ fileDropTarget }
<CallView ref="callView" room={this.state.room} ConferenceHandler={this.props.ConferenceHandler}
onResize={this.onCallViewResize} />
{ conferenceCallNotification }
{ aux }
</div>
{ topUnreadMessagesBar }
=======
{ auxPanel }
>>>>>>>
{ auxPanel }
{ topUnreadMessagesBar } |
<<<<<<<
const Tweet = () => <SimpleIcon name="twitter" size={20} />
=======
const Gist = () => <B>GIST</B>
>>>>>>>
const Tweet = () => <SimpleIcon name="twitter" size={20} />
const Gist = () => <B>GIST</B>
<<<<<<<
},
{
title: 'Insert Tweet',
Icon: Tweet,
command: 'insertTweet',
nodeType: 'tweet'
=======
},
{
title: 'Insert GitHub Gist',
Icon: Gist,
command: 'insertGist',
nodeType: 'gist'
>>>>>>>
},
{
title: 'Insert Tweet',
Icon: Tweet,
command: 'insertTweet',
nodeType: 'tweet'
},
{
title: 'Insert GitHub Gist',
Icon: Gist,
command: 'insertGist',
nodeType: 'gist' |
<<<<<<<
import Tweet from './Tweet'
=======
import Gist from './Gist'
>>>>>>>
import Tweet from './Tweet'
import Gist from './Gist'
<<<<<<<
const insertTweet = editor => {
editor.insertJSXBlock('tweet', {
tweetId: ''
})
}
=======
const insertGist = editor => {
editor.insertJSXBlock('Gist', {
id: ''
})
}
>>>>>>>
const insertTweet = editor => {
editor.insertJSXBlock('tweet', {
tweetId: ''
})
}
const insertGist = editor => {
editor.insertJSXBlock('Gist', {
id: ''
})
}
<<<<<<<
insertTweet,
=======
insertGist,
>>>>>>>
insertTweet,
insertGist,
<<<<<<<
switch (node.type) {
case 'youtube':
return <YouTube {...props} editor={editor} props={getProps(node)} />
break
case 'tweet':
return <Tweet {...props} editor={editor} props={getProps(node)} />
break
default:
return next()
=======
if (components[type]) {
const Component = components[type]
return (
<Wrapper
{...props}
editor={editor}
Component={Component}
component={type}
props={getProps(node)}
fields={Component.propertyControls}
/>
)
>>>>>>>
if (components[type]) {
const Component = components[type]
return (
<Wrapper
{...props}
editor={editor}
Component={Component}
component={type}
props={getProps(node)}
fields={Component.propertyControls}
/>
) |
<<<<<<<
onChange={e => onPropChange(key, e)}
id={title}
=======
onChange={e => onPropChange(key, e, ControlType.Number)}
>>>>>>>
onChange={e => onPropChange(key, e, ControlType.Number)}
id={title} |
<<<<<<<
wymeditor.rawHtml(getSelectedListItemsHtml);
$body = jQuery(wymeditor._doc).find('body.wym_iframe');
=======
wymeditor._html(getSelectedListItemsHtml);
$body = wymeditor.$body();
>>>>>>>
wymeditor.rawHtml(getSelectedListItemsHtml);
$body = wymeditor.$body();
<<<<<<<
wymeditor.rawHtml(startHtml);
$body = jQuery(wymeditor._doc).find('body.wym_iframe');
=======
wymeditor._html(startHtml);
$body = wymeditor.$body();
>>>>>>>
wymeditor.rawHtml(startHtml);
$body = wymeditor.$body();
<<<<<<<
wymeditor.rawHtml(startHtml);
$body = jQuery(wymeditor._doc).find('body.wym_iframe');
=======
wymeditor._html(startHtml);
$body = wymeditor.$body();
>>>>>>>
wymeditor.rawHtml(startHtml);
$body = wymeditor.$body();
<<<<<<<
wymeditor.rawHtml(startHtml);
$body = jQuery(wymeditor._doc).find('body.wym_iframe');
=======
wymeditor._html(startHtml);
$body = wymeditor.$body();
>>>>>>>
wymeditor.rawHtml(startHtml);
$body = wymeditor.$body();
<<<<<<<
wymeditor.rawHtml(html);
$body = jQuery(wymeditor._doc).find('body.wym_iframe');
=======
wymeditor._html(html);
$body = wymeditor.$body();
>>>>>>>
wymeditor.rawHtml(html);
$body = wymeditor.$body();
<<<<<<<
wymeditor.rawHtml(invalidNestingAfterEnterInEmptyLi[i].broken);
newLi = jQuery(wymeditor._doc).find('body.wym_iframe').find('#new')[0];
=======
wymeditor._html(invalidNestingAfterEnterInEmptyLi[i].broken);
newLi = wymeditor.$body().find('#new')[0];
>>>>>>>
wymeditor.rawHtml(invalidNestingAfterEnterInEmptyLi[i].broken);
newLi = wymeditor.$body().find('#new')[0]; |
<<<<<<<
wym._exec(WYMeditor.EXEC_COMMANDS.BOLD);
e.preventDefault();
=======
wym._exec(WYMeditor.BOLD);
evt.preventDefault();
>>>>>>>
wym._exec(WYMeditor.EXEC_COMMANDS.BOLD);
evt.preventDefault();
<<<<<<<
wym._exec(WYMeditor.EXEC_COMMANDS.ITALIC);
e.preventDefault();
=======
wym._exec(WYMeditor.ITALIC);
evt.preventDefault();
>>>>>>>
wym._exec(WYMeditor.EXEC_COMMANDS.ITALIC);
evt.preventDefault(); |
<<<<<<<
if (a.testUndoRedo === true) {
wymeditor.undoRedo.reset();
}
if (typeof a.manipulationFunc === 'function') {
a.manipulationFunc(wymeditor);
}
if (typeof a.expectedResultHtml === 'string') {
expect(expect() + 1);
wymEqual(
wymeditor,
a.expectedResultHtml,
{
assertionString: "Manipulation result HTML.",
parseHtml: typeof a.parseHtml === 'undefined' ? false :
a.parseHtml
}
);
}
if (typeof a.additionalAssertionsFunc === 'function') {
a.additionalAssertionsFunc(wymeditor);
}
if (a.testUndoRedo !== true) {
return;
}
wymeditor.undoRedo.undo();
expect(expect() + 1);
wymEqual(
wymeditor,
a.expectedStartHtml || a.startHtml,
{
assertionString: "Back to start HTML after undo.",
parseHtml: typeof a.parseHtml === 'undefined' ? false :
a.parseHtml
}
);
wymeditor.undoRedo.redo();
if (typeof a.expectedResultHtml === 'string') {
expect(expect() + 1);
wymEqual(
wymeditor,
a.expectedResultHtml,
{
assertionString: "Back to manipulation result HTML " +
"after redo.",
parseHtml: typeof a.parseHtml === 'undefined' ? false :
a.parseHtml
}
);
}
if (typeof a.additionalAssertionsFunc === 'function') {
a.additionalAssertionsFunc(wymeditor);
}
});
=======
if (typeof a.additionalAssertionsFunc === 'function') {
a.additionalAssertionsFunc(wymeditor);
}
>>>>>>>
if (typeof a.additionalAssertionsFunc === 'function') {
a.additionalAssertionsFunc(wymeditor);
}
if (a.testUndoRedo !== true) {
return;
}
wymeditor.undoRedo.undo();
expect(expect() + 1);
wymEqual(
wymeditor,
a.expectedStartHtml || a.startHtml,
{
assertionString: "Back to start HTML after undo.",
parseHtml: typeof a.parseHtml === 'undefined' ? false :
a.parseHtml
}
);
wymeditor.undoRedo.redo();
if (typeof a.expectedResultHtml === 'string') {
expect(expect() + 1);
wymEqual(
wymeditor,
a.expectedResultHtml,
{
assertionString: "Back to manipulation result HTML " +
"after redo.",
parseHtml: typeof a.parseHtml === 'undefined' ? false :
a.parseHtml
}
);
}
if (typeof a.additionalAssertionsFunc === 'function') {
a.additionalAssertionsFunc(wymeditor);
} |
<<<<<<<
/*
* Extend the Chart object with interaction
*/
=======
// Extend the Chart object with interaction.
>>>>>>>
/*
* Extend the Chart object with interaction
*/
<<<<<<<
=======
/*= } =*/
>>>>>>> |
<<<<<<<
=======
* Update the point with new options (typically x/y data) and optionally redraw the series.
*
* @param {Object} options Point options as defined in the series.data array
* @param {Boolean} redraw Whether to redraw the chart or wait for an explicit call
* @param {Boolean|Object} animation Whether to apply animation, and optionally animation
* configuration
*
*/
update: function (options, redraw, animation) {
var point = this,
series = point.series,
graphic = point.graphic,
i,
data = series.data,
chart = series.chart,
seriesOptions = series.options;
redraw = pick(redraw, true);
// fire the event with a default handler of doing the update
point.firePointEvent('update', { options: options }, function () {
point.applyOptions(options);
// update visuals
if (isObject(options)) {
series.getAttribs();
if (graphic) {
if (options && options.marker && options.marker.symbol) {
point.graphic = graphic.destroy();
} else {
graphic.attr(point.pointAttr[point.state || '']);
}
}
if (options && options.dataLabels && point.dataLabel) { // #2468
point.dataLabel = point.dataLabel.destroy();
}
}
// record changes in the parallel arrays
i = inArray(point, data);
series.updateParallelArrays(point, i);
seriesOptions.data[i] = point.options;
// redraw
series.isDirty = series.isDirtyData = true;
if (!series.fixedBox && series.hasCartesianSeries) { // #1906, #2320
chart.isDirtyBox = true;
}
if (seriesOptions.legendType === 'point') { // #1831, #1885
chart.legend.destroyItem(point);
}
if (redraw) {
chart.redraw(animation);
}
});
},
/**
* Remove a point and optionally redraw the series and if necessary the axes
* @param {Boolean} redraw Whether to redraw the chart or wait for an explicit call
* @param {Boolean|Object} animation Whether to apply animation, and optionally animation
* configuration
*/
remove: function (redraw, animation) {
var point = this,
series = point.series,
points = series.points,
chart = series.chart,
i,
data = series.data;
setAnimation(animation, chart);
redraw = pick(redraw, true);
// fire the event with a default handler of removing the point
point.firePointEvent('remove', null, function () {
// splice all the parallel arrays
i = inArray(point, data);
if (data.length === points.length) {
points.splice(i, 1);
}
data.splice(i, 1);
series.options.data.splice(i, 1);
series.updateParallelArrays(point, 'splice', i, 1);
point.destroy();
// redraw
series.isDirty = true;
series.isDirtyData = true;
if (redraw) {
chart.redraw();
}
});
},
/**
>>>>>>>
* Update the point with new options (typically x/y data) and optionally redraw the series.
*
* @param {Object} options Point options as defined in the series.data array
* @param {Boolean} redraw Whether to redraw the chart or wait for an explicit call
* @param {Boolean|Object} animation Whether to apply animation, and optionally animation
* configuration
*
*/
update: function (options, redraw, animation) {
var point = this,
series = point.series,
graphic = point.graphic,
i,
data = series.data,
chart = series.chart,
seriesOptions = series.options;
redraw = pick(redraw, true);
// fire the event with a default handler of doing the update
point.firePointEvent('update', { options: options }, function () {
point.applyOptions(options);
// update visuals
if (isObject(options)) {
series.getAttribs();
if (graphic) {
if (options && options.marker && options.marker.symbol) {
point.graphic = graphic.destroy();
} else {
graphic.attr(point.pointAttr[point.state || '']);
}
}
if (options && options.dataLabels && point.dataLabel) { // #2468
point.dataLabel = point.dataLabel.destroy();
}
}
// record changes in the parallel arrays
i = inArray(point, data);
series.updateParallelArrays(point, i);
seriesOptions.data[i] = point.options;
// redraw
series.isDirty = series.isDirtyData = true;
if (!series.fixedBox && series.hasCartesianSeries) { // #1906, #2320
chart.isDirtyBox = true;
}
if (seriesOptions.legendType === 'point') { // #1831, #1885
chart.legend.destroyItem(point);
}
if (redraw) {
chart.redraw(animation);
}
});
},
/**
* Remove a point and optionally redraw the series and if necessary the axes
* @param {Boolean} redraw Whether to redraw the chart or wait for an explicit call
* @param {Boolean|Object} animation Whether to apply animation, and optionally animation
* configuration
*/
remove: function (redraw, animation) {
var point = this,
series = point.series,
points = series.points,
chart = series.chart,
i,
data = series.data;
setAnimation(animation, chart);
redraw = pick(redraw, true);
// fire the event with a default handler of removing the point
point.firePointEvent('remove', null, function () {
// splice all the parallel arrays
i = inArray(point, data);
if (data.length === points.length) {
points.splice(i, 1);
}
data.splice(i, 1);
series.options.data.splice(i, 1);
series.updateParallelArrays(point, 'splice', i, 1);
point.destroy();
// redraw
series.isDirty = true;
series.isDirtyData = true;
if (redraw) {
chart.redraw();
}
});
},
/**
<<<<<<<
// Sort series according to index option (#248, #1123)
stableSort(chartSeries, function (a, b) {
return pick(a.options.index, a._i) - pick(b.options.index, a._i);
});
=======
// Sort series according to index option (#248, #1123, #2456)
stableSort(chartSeries, sortByIndex);
if (this.yAxis) {
stableSort(this.yAxis.series, sortByIndex);
}
>>>>>>>
// Sort series according to index option (#248, #1123, #2456)
stableSort(chartSeries, sortByIndex);
if (this.yAxis) {
stableSort(this.yAxis.series, sortByIndex);
}
<<<<<<<
// the tooltip options are merged between global and series specific options
this.tooltipOptions = merge(chartOptions.tooltip, options.tooltip);
// Delte marker object if not allowed (#1125)
=======
// The tooltip options are merged between global and series specific options
this.tooltipOptions = merge(
defaultOptions.tooltip,
defaultOptions.plotOptions[this.type].tooltip,
userOptions.tooltip,
userPlotOptions.series && userPlotOptions.series.tooltip,
userPlotOptions[this.type] && userPlotOptions[this.type].tooltip,
itemOptions.tooltip
);
// Delete marker object if not allowed (#1125)
>>>>>>>
// The tooltip options are merged between global and series specific options
this.tooltipOptions = merge(
defaultOptions.tooltip,
defaultOptions.plotOptions[this.type].tooltip,
userOptions.tooltip,
userPlotOptions.series && userPlotOptions.series.tooltip,
userPlotOptions[this.type] && userPlotOptions[this.type].tooltip,
itemOptions.tooltip
);
// Delete marker object if not allowed (#1125)
<<<<<<<
=======
data = data || [];
>>>>>>>
data = data || [];
<<<<<<<
=======
>>>>>>>
<<<<<<<
=======
* Draw the data labels
*/
drawDataLabels: function () {
var series = this,
seriesOptions = series.options,
cursor = seriesOptions.cursor,
options = seriesOptions.dataLabels,
points = series.points,
pointOptions,
generalOptions,
str,
dataLabelsGroup;
if (options.enabled || series._hasPointLabels) {
// Process default alignment of data labels for columns
if (series.dlProcessOptions) {
series.dlProcessOptions(options);
}
// Create a separate group for the data labels to avoid rotation
dataLabelsGroup = series.plotGroup(
'dataLabelsGroup',
'data-labels',
series.visible ? VISIBLE : HIDDEN,
options.zIndex || 6
);
// Make the labels for each point
generalOptions = options;
each(points, function (point) {
var enabled,
dataLabel = point.dataLabel,
labelConfig,
attr,
name,
rotation,
connector = point.connector,
isNew = true;
// Determine if each data label is enabled
pointOptions = point.options && point.options.dataLabels;
enabled = pick(pointOptions && pointOptions.enabled, generalOptions.enabled); // #2282
// If the point is outside the plot area, destroy it. #678, #820
if (dataLabel && !enabled) {
point.dataLabel = dataLabel.destroy();
// Individual labels are disabled if the are explicitly disabled
// in the point options, or if they fall outside the plot area.
} else if (enabled) {
// Create individual options structure that can be extended without
// affecting others
options = merge(generalOptions, pointOptions);
rotation = options.rotation;
// Get the string
labelConfig = point.getLabelConfig();
str = options.format ?
format(options.format, labelConfig) :
options.formatter.call(labelConfig, options);
// Determine the color
options.style.color = pick(options.color, options.style.color, series.color, 'black');
// update existing label
if (dataLabel) {
if (defined(str)) {
dataLabel
.attr({
text: str
});
isNew = false;
} else { // #1437 - the label is shown conditionally
point.dataLabel = dataLabel = dataLabel.destroy();
if (connector) {
point.connector = connector.destroy();
}
}
// create new label
} else if (defined(str)) {
attr = {
//align: align,
fill: options.backgroundColor,
stroke: options.borderColor,
'stroke-width': options.borderWidth,
r: options.borderRadius || 0,
rotation: rotation,
padding: options.padding,
zIndex: 1
};
// Remove unused attributes (#947)
for (name in attr) {
if (attr[name] === UNDEFINED) {
delete attr[name];
}
}
dataLabel = point.dataLabel = series.chart.renderer[rotation ? 'text' : 'label']( // labels don't support rotation
str,
0,
-999,
null,
null,
null,
options.useHTML
)
.attr(attr)
.css(extend(options.style, cursor && { cursor: cursor }))
.add(dataLabelsGroup)
.shadow(options.shadow);
}
if (dataLabel) {
// Now the data label is created and placed at 0,0, so we need to align it
series.alignDataLabel(point, dataLabel, options, null, isNew);
}
}
});
}
},
/**
* Align each individual data label
*/
alignDataLabel: function (point, dataLabel, options, alignTo, isNew) {
var chart = this.chart,
inverted = chart.inverted,
plotX = pick(point.plotX, -999),
plotY = pick(point.plotY, -999),
bBox = dataLabel.getBBox(),
visible = this.visible && chart.isInsidePlot(point.plotX, point.plotY, inverted),
alignAttr; // the final position;
if (visible) {
// The alignment box is a singular point
alignTo = extend({
x: inverted ? chart.plotWidth - plotY : plotX,
y: mathRound(inverted ? chart.plotHeight - plotX : plotY),
width: 0,
height: 0
}, alignTo);
// Add the text size for alignment calculation
extend(options, {
width: bBox.width,
height: bBox.height
});
// Allow a hook for changing alignment in the last moment, then do the alignment
if (options.rotation) { // Fancy box alignment isn't supported for rotated text
alignAttr = {
align: options.align,
x: alignTo.x + options.x + alignTo.width / 2,
y: alignTo.y + options.y + alignTo.height / 2
};
dataLabel[isNew ? 'attr' : 'animate'](alignAttr);
} else {
dataLabel.align(options, null, alignTo);
alignAttr = dataLabel.alignAttr;
// Handle justify or crop
if (pick(options.overflow, 'justify') === 'justify') {
this.justifyDataLabel(dataLabel, options, alignAttr, bBox, alignTo, isNew);
} else if (pick(options.crop, true)) {
// Now check that the data label is within the plot area
visible = chart.isInsidePlot(alignAttr.x, alignAttr.y) && chart.isInsidePlot(alignAttr.x + bBox.width, alignAttr.y + bBox.height);
}
}
}
// Show or hide based on the final aligned position
if (!visible) {
dataLabel.attr({ y: -999 });
dataLabel.placed = false; // don't animate back in
}
},
/**
* If data labels fall partly outside the plot area, align them back in, in a way that
* doesn't hide the point.
*/
justifyDataLabel: function (dataLabel, options, alignAttr, bBox, alignTo, isNew) {
var chart = this.chart,
align = options.align,
verticalAlign = options.verticalAlign,
off,
justified;
// Off left
off = alignAttr.x;
if (off < 0) {
if (align === 'right') {
options.align = 'left';
} else {
options.x = -off;
}
justified = true;
}
// Off right
off = alignAttr.x + bBox.width;
if (off > chart.plotWidth) {
if (align === 'left') {
options.align = 'right';
} else {
options.x = chart.plotWidth - off;
}
justified = true;
}
// Off top
off = alignAttr.y;
if (off < 0) {
if (verticalAlign === 'bottom') {
options.verticalAlign = 'top';
} else {
options.y = -off;
}
justified = true;
}
// Off bottom
off = alignAttr.y + bBox.height;
if (off > chart.plotHeight) {
if (verticalAlign === 'top') {
options.verticalAlign = 'bottom';
} else {
options.y = chart.plotHeight - off;
}
justified = true;
}
if (justified) {
dataLabel.placed = !isNew;
dataLabel.align(options, null, alignTo);
}
},
/**
>>>>>>> |
<<<<<<<
H.hasTouch = document.documentElement.ontouchstart !== undefined;
=======
hasTouch = doc && doc.documentElement.ontouchstart !== UNDEFINED;
>>>>>>>
H.hasTouch = doc && doc.documentElement.ontouchstart !== undefined;
<<<<<<<
// common IE normalizing
e = e || window.event;
// Framework specific normalizing (#1165)
e = HighchartsAdapter.washMouseEvent(e);
// More IE normalizing, needs to go after washMouseEvent
=======
// IE normalizing
e = e || win.event;
>>>>>>>
// IE normalizing
e = e || win.event; |
<<<<<<<
* @constructor Series
* @param {Object} chart - The chart instance.
* @param {Object} options - The series options.
* @optionparent plotOptions.line
=======
* Configuration options for the series are given in three levels. Options for
* all series in a chart are given in the {@link https://api.highcharts.com/highcharts/plotOptions.series|
* plotOptions.series} object. Then options for all series of a specific type
* are given in the plotOptions of that type, for example `plotOptions.line`.
* Next, options for one single series are given in the series array, or as
* arguements to `chart.addSeries`.
*
* The data in the series is stored in various arrays.
*
* - First, `series.options.data` contains all the original config options for
* each point whether added by options or methods like `series.addPoint`.
* - Next, `series.data` contains those values converted to points, but in case
* the series data length exceeds the `cropThreshold`, or if the data is grouped,
* `series.data` doesn't contain all the points. It only contains the points that
* have been created on demand.
* - Then there's `series.points` that contains all currently visible point
* objects. In case of cropping, the cropped-away points are not part of this
* array. The `series.points` array starts at `series.cropStart` compared to
* `series.data` and `series.options.data`. If however the series data is grouped,
* these can't be correlated one to one.
* - `series.xData` and `series.processedXData` contain clean x values, equivalent
* to `series.data` and `series.points`.
* - `series.yData` and `series.processedYData` contain clean y values, equivalent
* to `series.data` and `series.points`.
*
* @class Highcharts.Series
* @param {Highcharts.Chart} chart
* The chart instance.
* @param {Object} options
* The series options.
>>>>>>>
* Configuration options for the series are given in three levels. Options for
* all series in a chart are given in the {@link https://api.highcharts.com/highcharts/plotOptions.series|
* plotOptions.series} object. Then options for all series of a specific type
* are given in the plotOptions of that type, for example `plotOptions.line`.
* Next, options for one single series are given in the series array, or as
* arguements to `chart.addSeries`.
*
* The data in the series is stored in various arrays.
*
* - First, `series.options.data` contains all the original config options for
* each point whether added by options or methods like `series.addPoint`.
* - Next, `series.data` contains those values converted to points, but in case
* the series data length exceeds the `cropThreshold`, or if the data is grouped,
* `series.data` doesn't contain all the points. It only contains the points that
* have been created on demand.
* - Then there's `series.points` that contains all currently visible point
* objects. In case of cropping, the cropped-away points are not part of this
* array. The `series.points` array starts at `series.cropStart` compared to
* `series.data` and `series.options.data`. If however the series data is grouped,
* these can't be correlated one to one.
* - `series.xData` and `series.processedXData` contain clean x values, equivalent
* to `series.data` and `series.points`.
* - `series.yData` and `series.processedYData` contain clean y values, equivalent
* to `series.data` and `series.points`.
*
* @class Highcharts.Series
* @param {Highcharts.Chart} chart
* The chart instance.
* @param {Object} options
* The series options.
*
* @optionparent plotOptions.line |
<<<<<<<
return format;
=======
>>>>>>> |
<<<<<<<
Math.round(pos.x),
Math.round(pos.y),
=======
mathRound(pos.x),
mathRound(pos.y || 0), // can be undefined (#3977)
>>>>>>>
Math.round(pos.x),
Math.round(pos.y || 0), // can be undefined (#3977)
<<<<<<<
timeUnits = H.timeUnits,
lastN;
=======
lastN = 'millisecond'; // for sub-millisecond data, #4223
>>>>>>>
timeUnits = H.timeUnits,
lastN = 'millisecond'; // for sub-millisecond data, #4223 |
<<<<<<<
defaultDataGroupingUnits = H.defaultDataGroupingUnits = [[
=======
defaultDataGroupingUnits = [
[
>>>>>>>
defaultDataGroupingUnits = H.defaultDataGroupingUnits = [
[ |
<<<<<<<
size * { left: 0, center: 0.5, right: 1 }[axis.labelAlign] - labelOptions.x :
=======
labelOptions.x - size * { left: 0, center: 0.5, right: 1 }[axis.labelAlign] :
0,
rightSide = horiz ?
size + leftSide :
>>>>>>>
labelOptions.x - size * { left: 0, center: 0.5, right: 1 }[axis.labelAlign] :
0,
rightSide = horiz ?
size + leftSide :
<<<<<<<
=======
* The class for stack items
*/
function StackItem(axis, options, isNegative, x, stackOption, stacking) {
var inverted = axis.chart.inverted;
this.axis = axis;
// Tells if the stack is negative
this.isNegative = isNegative;
// Save the options to be able to style the label
this.options = options;
// Save the x value to be able to position the label later
this.x = x;
// Initialize total value
this.total = null;
// This will keep each points' extremes stored by series.index
this.points = {};
// Save the stack option on the series configuration object, and whether to treat it as percent
this.stack = stackOption;
this.percent = stacking === 'percent';
// The align options and text align varies on whether the stack is negative and
// if the chart is inverted or not.
// First test the user supplied value, then use the dynamic.
this.alignOptions = {
align: options.align || (inverted ? (isNegative ? 'left' : 'right') : 'center'),
verticalAlign: options.verticalAlign || (inverted ? 'middle' : (isNegative ? 'bottom' : 'top')),
y: pick(options.y, inverted ? 4 : (isNegative ? 14 : -6)),
x: pick(options.x, inverted ? (isNegative ? -6 : 6) : 0)
};
this.textAlign = options.textAlign || (inverted ? (isNegative ? 'right' : 'left') : 'center');
}
StackItem.prototype = {
destroy: function () {
destroyObjectProperties(this, this.axis);
},
/**
* Renders the stack total label and adds it to the stack label group.
*/
render: function (group) {
var options = this.options,
formatOption = options.format,
str = formatOption ?
format(formatOption, this) :
options.formatter.call(this); // format the text in the label
// Change the text to reflect the new total and set visibility to hidden in case the serie is hidden
if (this.label) {
this.label.attr({text: str, visibility: HIDDEN});
// Create new label
} else {
this.label =
this.axis.chart.renderer.text(str, 0, 0, options.useHTML) // dummy positions, actual position updated with setOffset method in columnseries
.css(options.style) // apply style
.attr({
align: this.textAlign, // fix the text-anchor
rotation: options.rotation, // rotation
visibility: HIDDEN // hidden until setOffset is called
})
.add(group); // add to the labels-group
}
},
/**
* Sets the offset that the stack has from the x value and repositions the label.
*/
setOffset: function (xOffset, xWidth) {
var stackItem = this,
axis = stackItem.axis,
chart = axis.chart,
inverted = chart.inverted,
neg = this.isNegative, // special treatment is needed for negative stacks
y = axis.translate(this.percent ? 100 : this.total, 0, 0, 0, 1), // stack value translated mapped to chart coordinates
yZero = axis.translate(0), // stack origin
h = mathAbs(y - yZero), // stack height
x = chart.xAxis[0].translate(this.x) + xOffset, // stack x position
plotHeight = chart.plotHeight,
stackBox = { // this is the box for the complete stack
x: inverted ? (neg ? y : y - h) : x,
y: inverted ? plotHeight - x - xWidth : (neg ? (plotHeight - y - h) : plotHeight - y),
width: inverted ? h : xWidth,
height: inverted ? xWidth : h
},
label = this.label,
alignAttr;
if (label) {
label.align(this.alignOptions, null, stackBox); // align the label to the box
// Set visibility (#678)
alignAttr = label.alignAttr;
label[this.options.crop === false || chart.isInsidePlot(alignAttr.x, alignAttr.y) ? 'show' : 'hide'](true);
}
}
};
/**
>>>>>>>
<<<<<<<
=======
* Build the stacks from top down
*/
buildStacks: function () {
var series = this.series,
i = series.length;
if (!this.isXAxis) {
this.usePercentage = false;
while (i--) {
series[i].setStackedPoints();
}
// Loop up again to compute percent stack
if (this.usePercentage) {
for (i = 0; i < series.length; i++) {
series[i].setPercentStacks();
}
}
}
},
/**
>>>>>>>
<<<<<<<
// Workaround for #2030, horizontal legend items not displaying in IE11 Preview.
// TODO: When IE11 is released, check again for this bug, and remove the fix
// or make a better one.
if (/Trident\/7\.0/.test(userAgent)) {
=======
// Workaround for #2030, horizontal legend items not displaying in IE11 Preview,
// and for #2580, a similar drawing flaw in Firefox 26.
// TODO: Explore if there's a general cause for this. The problem may be related
// to nested group elements, as the legend item texts are within 4 group elements.
if (/Trident\/7\.0/.test(userAgent) || isFirefox) {
>>>>>>>
// Workaround for #2030, horizontal legend items not displaying in IE11 Preview,
// and for #2580, a similar drawing flaw in Firefox 26.
// TODO: Explore if there's a general cause for this. The problem may be related
// to nested group elements, as the legend item texts are within 4 group elements.
if (/Trident\/7\.0/.test(userAgent) || isFirefox) {
<<<<<<<
=======
* Adds series' points value to corresponding stack
*/
setStackedPoints: function () {
if (!this.options.stacking || (this.visible !== true && this.chart.options.chart.ignoreHiddenSeries !== false)) {
return;
}
var series = this,
xData = series.processedXData,
yData = series.processedYData,
stackedYData = [],
yDataLength = yData.length,
seriesOptions = series.options,
threshold = seriesOptions.threshold,
stackOption = seriesOptions.stack,
stacking = seriesOptions.stacking,
stackKey = series.stackKey,
negKey = '-' + stackKey,
negStacks = series.negStacks,
yAxis = series.yAxis,
stacks = yAxis.stacks,
oldStacks = yAxis.oldStacks,
isNegative,
stack,
other,
key,
i,
x,
y;
// loop over the non-null y values and read them into a local array
for (i = 0; i < yDataLength; i++) {
x = xData[i];
y = yData[i];
// Read stacked values into a stack based on the x value,
// the sign of y and the stack key. Stacking is also handled for null values (#739)
isNegative = negStacks && y < threshold;
key = isNegative ? negKey : stackKey;
// Create empty object for this stack if it doesn't exist yet
if (!stacks[key]) {
stacks[key] = {};
}
// Initialize StackItem for this x
if (!stacks[key][x]) {
if (oldStacks[key] && oldStacks[key][x]) {
stacks[key][x] = oldStacks[key][x];
stacks[key][x].total = null;
} else {
stacks[key][x] = new StackItem(yAxis, yAxis.options.stackLabels, isNegative, x, stackOption, stacking);
}
}
// If the StackItem doesn't exist, create it first
stack = stacks[key][x];
stack.points[series.index] = [stack.cum || 0];
// Add value to the stack total
if (stacking === 'percent') {
// Percent stacked column, totals are the same for the positive and negative stacks
other = isNegative ? stackKey : negKey;
if (negStacks && stacks[other] && stacks[other][x]) {
other = stacks[other][x];
stack.total = other.total = mathMax(other.total, stack.total) + mathAbs(y) || 0;
// Percent stacked areas
} else {
stack.total = correctFloat(stack.total + (mathAbs(y) || 0));
}
} else {
stack.total = correctFloat(stack.total + (y || 0));
}
stack.cum = (stack.cum || 0) + (y || 0);
stack.points[series.index].push(stack.cum);
stackedYData[i] = stack.cum;
}
if (stacking === 'percent') {
yAxis.usePercentage = true;
}
this.stackedYData = stackedYData; // To be used in getExtremes
// Reset old stacks
yAxis.oldStacks = {};
},
/**
* Iterate over all stacks and compute the absolute values to percent
*/
setPercentStacks: function () {
var series = this,
stackKey = series.stackKey,
stacks = series.yAxis.stacks,
processedXData = series.processedXData;
each([stackKey, '-' + stackKey], function (key) {
var i = processedXData.length,
x,
stack,
pointExtremes,
totalFactor;
while (i--) {
x = processedXData[i];
stack = stacks[key] && stacks[key][x];
pointExtremes = stack && stack.points[series.index];
if (pointExtremes) {
totalFactor = stack.total ? 100 / stack.total : 0;
pointExtremes[0] = correctFloat(pointExtremes[0] * totalFactor); // Y bottom value
pointExtremes[1] = correctFloat(pointExtremes[1] * totalFactor); // Y value
series.stackedYData[i] = pointExtremes[1];
}
}
});
},
/**
>>>>>>>
<<<<<<<
chart[sharedClipKey + 'm'] = markerClipRect = renderer.clipRect(
-99, // include the width of the first marker
inverted ? -chart.plotLeft : -chart.plotTop,
99,
inverted ? chart.chartWidth : chart.chartHeight
);
}
series.group.clip(clipRect);
series.markerGroup.clip(markerClipRect);
series.sharedClipKey = sharedClipKey;
=======
// Polar needs additional shaping
if (series.orderTooltipPoints) {
series.orderTooltipPoints(points);
}
// Assign each pixel position to the nearest point
pointsLength = points.length;
for (i = 0; i < pointsLength; i++) {
point = points[i];
pointX = point.x;
if (pointX >= xExtremes.min && pointX <= xExtremes.max) { // #1149
nextPoint = points[i + 1];
// Set this range's low to the last range's high plus one
low = high === UNDEFINED ? 0 : high + 1;
// Now find the new high
high = points[i + 1] ?
mathMin(mathMax(0, mathFloor( // #2070
(point.clientX + (nextPoint ? (nextPoint.wrappedClientX || nextPoint.clientX) : axisLength)) / 2
)), axisLength) :
axisLength;
while (low >= 0 && low <= high) {
tooltipPoints[low++] = point;
}
}
}
series.tooltipPoints = tooltipPoints;
},
/**
* Format the header of the tooltip
*/
tooltipHeaderFormatter: function (point) {
var series = this,
tooltipOptions = series.tooltipOptions,
dateTimeLabelFormats = tooltipOptions.dateTimeLabelFormats,
xDateFormat = tooltipOptions.xDateFormat,
xAxis = series.xAxis,
isDateTime = xAxis && xAxis.options.type === 'datetime' && isNumber(point.key),
headerFormat = tooltipOptions.headerFormat,
closestPointRange = xAxis && xAxis.closestPointRange,
n;
// Guess the best date format based on the closest point distance (#568)
if (isDateTime && !xDateFormat) {
if (closestPointRange) {
for (n in timeUnits) {
if (timeUnits[n] >= closestPointRange || point.key % timeUnits[n] > 0) { // #2637
xDateFormat = dateTimeLabelFormats[n];
break;
}
}
} else {
xDateFormat = dateTimeLabelFormats.day;
}
xDateFormat = xDateFormat || dateTimeLabelFormats.year; // #2546, 2581
}
// Insert the header date format if any
if (isDateTime && xDateFormat) {
headerFormat = headerFormat.replace('{point.key}', '{point.key:' + xDateFormat + '}');
}
return format(headerFormat, {
point: point,
series: series
});
},
/**
* Series mouse over handler
*/
onMouseOver: function () {
var series = this,
chart = series.chart,
hoverSeries = chart.hoverSeries;
// set normal state to previous series
if (hoverSeries && hoverSeries !== series) {
hoverSeries.onMouseOut();
}
// trigger the event, but to save processing time,
// only if defined
if (series.options.events.mouseOver) {
fireEvent(series, 'mouseOver');
}
// hover this
series.setState(HOVER_STATE);
chart.hoverSeries = series;
},
/**
* Series mouse out handler
*/
onMouseOut: function () {
// trigger the event only if listeners exist
var series = this,
options = series.options,
chart = series.chart,
tooltip = chart.tooltip,
hoverPoint = chart.hoverPoint;
// trigger mouse out on the point, which must be in this series
if (hoverPoint) {
hoverPoint.onMouseOut();
}
// fire the mouse out event
if (series && options.events.mouseOut) {
fireEvent(series, 'mouseOut');
}
// hide the tooltip
if (tooltip && !options.stickyTracking && (!tooltip.shared || series.noSharedTooltip)) {
tooltip.hide();
}
// set normal state
series.setState();
chart.hoverSeries = null;
},
/**
* Animate in the series
*/
animate: function (init) {
var series = this,
chart = series.chart,
renderer = chart.renderer,
clipRect,
markerClipRect,
animation = series.options.animation,
clipBox = chart.clipBox,
inverted = chart.inverted,
sharedClipKey;
// Animation option is set to true
if (animation && !isObject(animation)) {
animation = defaultPlotOptions[series.type].animation;
}
sharedClipKey = '_sharedClip' + animation.duration + animation.easing;
// Initialize the animation. Set up the clipping rectangle.
if (init) {
// If a clipping rectangle with the same properties is currently present in the chart, use that.
clipRect = chart[sharedClipKey];
markerClipRect = chart[sharedClipKey + 'm'];
if (!clipRect) {
chart[sharedClipKey] = clipRect = renderer.clipRect(
extend(clipBox, { width: 0 })
);
chart[sharedClipKey + 'm'] = markerClipRect = renderer.clipRect(
-99, // include the width of the first marker
inverted ? -chart.plotLeft : -chart.plotTop,
99,
inverted ? chart.chartWidth : chart.chartHeight
);
}
series.group.clip(clipRect);
series.markerGroup.clip(markerClipRect);
series.sharedClipKey = sharedClipKey;
>>>>>>>
chart[sharedClipKey + 'm'] = markerClipRect = renderer.clipRect(
-99, // include the width of the first marker
inverted ? -chart.plotLeft : -chart.plotTop,
99,
inverted ? chart.chartWidth : chart.chartHeight
);
}
series.group.clip(clipRect);
series.markerGroup.clip(markerClipRect);
series.sharedClipKey = sharedClipKey; |
<<<<<<<
* @license Highstock JS v3.0-dev (2015-10-07)
=======
* @license Highstock JS v2.1.9-modified ()
>>>>>>>
* @license Highstock JS v3.0-dev (2015-10-07)
<<<<<<<
var SVG_NS = 'http://www.w3.org/2000/svg',
svg = !!document.createElementNS && !!document.createElementNS(SVG_NS, 'svg').createSVGRect,
isIE = /(msie|trident)/i.test(userAgent) && !window.opera,
useCanVG = !svg && !isIE && !!document.createElement('canvas').getContext,
vml = !svg && !useCanVG,
userAgent = navigator.userAgent,
isFirefox = /Firefox/.test(userAgent),
hasBidiBug = isFirefox && parseInt(userAgent.split('Firefox/')[1], 10) < 4; // issue #38
window.Highcharts = window.Highcharts ? window.Highcharts.error(16, true) : {
product: 'Highstock',
version: '3.0-dev',
deg2rad: Math.PI * 2 / 360,
hasBidiBug: hasBidiBug,
isIE: isIE,
isWebKit: /AppleWebKit/.test(userAgent),
isFirefox: isFirefox,
isTouchDevice: /(Mobile|Android|Windows Phone)/.test(userAgent),
SVG_NS: SVG_NS,
idCounter: 0,
chartCount: 0,
seriesTypes: {},
svg: svg,
useCanVG: useCanVG,
vml: vml,
charts: [],
noop: function () {}
};
=======
// encapsulated variables
var UNDEFINED,
doc = document,
win = window,
math = Math,
mathRound = math.round,
mathFloor = math.floor,
mathCeil = math.ceil,
mathMax = math.max,
mathMin = math.min,
mathAbs = math.abs,
mathCos = math.cos,
mathSin = math.sin,
mathPI = math.PI,
deg2rad = mathPI * 2 / 360,
// some variables
userAgent = navigator.userAgent,
isOpera = win.opera,
isMS = /(msie|trident|edge)/i.test(userAgent) && !isOpera,
docMode8 = doc.documentMode === 8,
isWebKit = !isMS && /AppleWebKit/.test(userAgent),
isFirefox = /Firefox/.test(userAgent),
isTouchDevice = /(Mobile|Android|Windows Phone)/.test(userAgent),
SVG_NS = 'http://www.w3.org/2000/svg',
hasSVG = !!doc.createElementNS && !!doc.createElementNS(SVG_NS, 'svg').createSVGRect,
hasBidiBug = isFirefox && parseInt(userAgent.split('Firefox/')[1], 10) < 4, // issue #38
useCanVG = !hasSVG && !isMS && !!doc.createElement('canvas').getContext,
Renderer,
hasTouch,
symbolSizes = {},
idCounter = 0,
garbageBin,
defaultOptions,
dateFormat, // function
pathAnim,
timeUnits,
noop = function () { return UNDEFINED; },
charts = [],
chartCount = 0,
PRODUCT = 'Highstock',
VERSION = '2.1.9-modified',
// some constants for frequently used strings
DIV = 'div',
ABSOLUTE = 'absolute',
RELATIVE = 'relative',
HIDDEN = 'hidden',
PREFIX = 'highcharts-',
VISIBLE = 'visible',
PX = 'px',
NONE = 'none',
M = 'M',
L = 'L',
numRegex = /^[0-9]+$/,
NORMAL_STATE = '',
HOVER_STATE = 'hover',
SELECT_STATE = 'select',
marginNames = ['plotTop', 'marginRight', 'marginBottom', 'plotLeft'],
// Object for extending Axis
AxisPlotLineOrBandExtension,
// constants for attributes
STROKE_WIDTH = 'stroke-width',
// time methods, changed based on whether or not UTC is used
Date, // Allow using a different Date class
makeTime,
timezoneOffset,
getTimezoneOffset,
getMinutes,
getHours,
getDay,
getDate,
getMonth,
getFullYear,
setMilliseconds,
setSeconds,
setMinutes,
setHours,
setDate,
setMonth,
setFullYear,
// lookup over the types and the associated classes
seriesTypes = {},
Highcharts;
// The Highcharts namespace
Highcharts = win.Highcharts = win.Highcharts ? error(16, true) : {};
Highcharts.seriesTypes = seriesTypes;
>>>>>>>
var SVG_NS = 'http://www.w3.org/2000/svg',
svg = !!document.createElementNS && !!document.createElementNS(SVG_NS, 'svg').createSVGRect,
isMS = /(edge|msie|trident)/i.test(userAgent) && !window.opera,
useCanVG = !svg && !isMS && !!document.createElement('canvas').getContext,
vml = !svg && !useCanVG,
userAgent = navigator.userAgent,
isFirefox = /Firefox/.test(userAgent),
hasBidiBug = isFirefox && parseInt(userAgent.split('Firefox/')[1], 10) < 4; // issue #38
window.Highcharts = window.Highcharts ? window.Highcharts.error(16, true) : {
product: 'Highstock',
version: '3.0-dev',
deg2rad: Math.PI * 2 / 360,
hasBidiBug: hasBidiBug,
isMS: isMS,
isWebKit: /AppleWebKit/.test(userAgent),
isFirefox: isFirefox,
isTouchDevice: /(Mobile|Android|Windows Phone)/.test(userAgent),
SVG_NS: SVG_NS,
idCounter: 0,
chartCount: 0,
seriesTypes: {},
svg: svg,
useCanVG: useCanVG,
vml: vml,
charts: [],
noop: function () {}
};
<<<<<<<
H.css = function (el, styles) {
if (H.isIE && !H.svg) { // #2686
if (styles && styles.opacity !== undefined) {
=======
function css(el, styles) {
if (isMS && !hasSVG) { // #2686
if (styles && styles.opacity !== UNDEFINED) {
>>>>>>>
H.css = function (el, styles) {
if (H.isMS && !H.svg) { // #2686
if (styles && styles.opacity !== undefined) {
<<<<<<<
canvasToolsURL: 'http://code.highcharts.com/stock/3.0-dev/modules/canvas-tools.js',
VMLRadialGradientURL: 'http://code.highcharts.com/stock/3.0-dev/gfx/vml-radial-gradient.png'
=======
canvasToolsURL: 'http://code.highcharts.com/stock/2.1.9-modified/modules/canvas-tools.js',
VMLRadialGradientURL: 'http://code.highcharts.com/stock/2.1.9-modified/gfx/vml-radial-gradient.png'
>>>>>>>
canvasToolsURL: 'http://code.highcharts.com/stock/3.0-dev/modules/canvas-tools.js',
VMLRadialGradientURL: 'http://code.highcharts.com/stock/3.0-dev/gfx/vml-radial-gradient.png'
<<<<<<<
pointerEvents: 'none', // #1686 http://caniuse.com/#feat=pointer-events // docs
=======
padding: '8px',
pointerEvents: 'none', // #1686 http://caniuse.com/#feat=pointer-events
>>>>>>>
pointerEvents: 'none', // #1686 http://caniuse.com/#feat=pointer-events
<<<<<<<
// this again with new IE release. In exports, the rendering is passed to PhantomJS.
supports = this.renderer.forExport || (elem.style.textShadow !== undefined && !isIE);
=======
// this again with new IE release. In exports, the rendering is passed to PhantomJS.
supports = forExport || (elem.style.textShadow !== UNDEFINED && !isMS);
>>>>>>>
// this again with new IE release. In exports, the rendering is passed to PhantomJS.
supports = this.renderer.forExport || (elem.style.textShadow !== undefined && !isMS);
<<<<<<<
if (isIE && !svg) {
=======
if (isMS && !hasSVG) {
>>>>>>>
if (isMS && !svg) {
<<<<<<<
cssTransformKey = isIE ? '-ms-transform' : isWebKit ? '-webkit-transform' : isFirefox ? 'MozTransform' : window.opera ? '-o-transform' : '';
=======
cssTransformKey = isMS ? '-ms-transform' : isWebKit ? '-webkit-transform' : isFirefox ? 'MozTransform' : isOpera ? '-o-transform' : '';
>>>>>>>
cssTransformKey = isMS ? '-ms-transform' : isWebKit ? '-webkit-transform' : isFirefox ? 'MozTransform' : window.opera ? '-o-transform' : '';
<<<<<<<
if (seriesPointRange > range) { // #1446
seriesPointRange = 0;
}
pointRange = Math.max(pointRange, seriesPointRange);
=======
pointRange = mathMax(pointRange, seriesPointRange);
>>>>>>>
pointRange = Math.max(pointRange, seriesPointRange);
<<<<<<<
.addClass('highcharts-' + axis.coll.toLowerCase() + '-labels')
.add();
=======
.addClass(PREFIX + axis.coll.toLowerCase() + '-labels')
.add(axisParent);
>>>>>>>
.addClass('highcharts-' + axis.coll.toLowerCase() + '-labels')
.add(axisParent);
<<<<<<<
y: titleOffset + (titleOptions.margin - 13) + (titleSize || 0)
=======
y: titleOffset + (titleOptions.margin - 13) + renderer.fontMetrics(subtitleOptions.style.fontSize, title).b
>>>>>>>
y: titleOffset + (titleOptions.margin - 13) + (titleSize || 0)
<<<<<<<
.addClass('highcharts-point' + (point.selected ? ' highcharts-point-select' : ''))
.add(series.group);
// Presentational
graphic
.attr(series.pointAttribs(point, point.selected && 'select'))
=======
.attr(borderAttr)
.attr(pointAttr)
.add(point.group || series.group)
>>>>>>>
.addClass('highcharts-point' + (point.selected ? ' highcharts-point-select' : ''))
.add(point.group || series.group);
// Presentational
graphic
.attr(series.pointAttribs(point, point.selected && 'select'))
<<<<<<<
* Highstock JS v3.0-dev (2015-10-07)
=======
* Highstock JS v2.1.9-modified ()
>>>>>>>
* Highstock JS v3.0-dev (2015-10-07)
<<<<<<<
* Highstock JS v3.0-dev (2015-10-07)
=======
* Highstock JS v2.1.9-modified ()
>>>>>>>
* Highstock JS v3.0-dev (2015-10-07) |
<<<<<<<
var seriesType = H.seriesType,
=======
var defined = H.defined,
isObject = H.isObject,
merge = H.merge,
seriesType = H.seriesType,
pick = H.pick,
>>>>>>>
var defined = H.defined,
isObject = H.isObject,
merge = H.merge,
seriesType = H.seriesType,
pick = H.pick,
<<<<<<<
* A sankey diagram is a type of flow diagram, in which the width of the
* link between two nodes is shown proportionally to the flow quantity.
*
* @sample highcharts/demo/sankey-diagram/
* Sankey diagram
* @sample highcharts/plotoptions/sankey-inverted/
* Inverted sankey diagram
* @sample highcharts/plotoptions/sankey-outgoing
* Sankey diagram with outgoing links
*
* @extends plotOptions.column
* @since 6.0.0
* @product highcharts
* @excluding animationLimit, boostThreshold, borderColor, borderRadius,
* borderWidth, crisp, cropThreshold, depth, dragDrop,
* edgeColor, edgeWidth, findNearestPointBy,
* getExtremesFromAll, grouping, groupPadding, groupZPadding,
* label, linkedTo, maxPointWidth, negativeColor,
* pointInterval, pointIntervalUnit, pointPadding,
* pointPlacement, pointRange, pointStart, pointWidth, shadow,
* softThreshold, stacking, threshold, zoneAxis, zones
* @optionparent plotOptions.sankey
*/
=======
* A sankey diagram is a type of flow diagram, in which the width of the
* link between two nodes is shown proportionally to the flow quantity.
*
* @sample highcharts/demo/sankey-diagram/
* Sankey diagram
* @sample highcharts/plotoptions/sankey-inverted/
* Inverted sankey diagram
* @sample highcharts/plotoptions/sankey-outgoing
* Sankey diagram with outgoing links
*
* @extends plotOptions.column
* @since 6.0.0
* @product highcharts
* @excluding animationLimit, boostThreshold, borderRadius,
* crisp, cropThreshold, depth, edgeColor, edgeWidth,
* findNearestPointBy, grouping, groupPadding, groupZPadding,
* maxPointWidth, negativeColor, pointInterval, pointIntervalUnit,
* pointPadding, pointPlacement, pointRange, pointStart,
* pointWidth, shadow, softThreshold, stacking, threshold,
* zoneAxis, zones
* @optionparent plotOptions.sankey
*/
>>>>>>>
* A sankey diagram is a type of flow diagram, in which the width of the
* link between two nodes is shown proportionally to the flow quantity.
*
* @sample highcharts/demo/sankey-diagram/
* Sankey diagram
* @sample highcharts/plotoptions/sankey-inverted/
* Inverted sankey diagram
* @sample highcharts/plotoptions/sankey-outgoing
* Sankey diagram with outgoing links
*
* @extends plotOptions.column
* @since 6.0.0
* @product highcharts
* @excluding animationLimit, boostThreshold, borderRadius,
* crisp, cropThreshold, depth, edgeColor, edgeWidth,
* findNearestPointBy, grouping, groupPadding, groupZPadding,
* maxPointWidth, negativeColor, pointInterval,
* pointIntervalUnit, pointPadding, pointPlacement,
* pointRange, pointStart, pointWidth, shadow, softThreshold,
* stacking, threshold, zoneAxis, zones
* @optionparent plotOptions.sankey
*/
<<<<<<<
* Opacity for the links between nodes in the sankey diagram or
* dependency wheel.
*/
=======
* Set options on specific levels. Takes precedence over series options,
* but not point options.
*
* @sample highcharts/demo/sunburst
* Sunburst chart
*
* @type {Array<*>}
* @since 7.1.0
* @apioption plotOptions.sankey.levels
*/
/**
* Can set `borderColor` on all points which lies on the same level.
*
* @type {Highcharts.ColorString}
* @apioption plotOptions.sankey.levels.borderColor
*/
/**
* Can set `borderWidth` on all points which lies on the same level.
*
* @type {number}
* @apioption plotOptions.sankey.levels.borderWidth
*/
/**
* Can set `color` on all points which lies on the same level.
*
* @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
* @apioption plotOptions.sankey.levels.color
*/
/**
* Can set `colorByPoint` on all points which lies on the same level.
*
* @type {boolean}
* @apioption plotOptions.sankey.levels.colorByPoint
*/
/**
* Can set `dataLabels` on all points which lies on the same level.
*
* @type {object}
* @apioption plotOptions.sankey.levels.dataLabels
*/
/**
* Decides which level takes effect from the options set in the levels
* object.
*
* @type {number}
* @apioption plotOptions.sankey.levels.level
*/
/**
* Can set `linkOpacity` on all points which lies on the same level.
*
* @type {number}
* @apioption plotOptions.sankey.levels.linkOpacity
*/
/**
* Can set `states` on all points which lies on the same level.
*
* @type {object}
* @apioption plotOptions.sankey.levels.states
*/
/**
* Opacity for the links between nodes in the sankey diagram.
*/
>>>>>>>
* Set options on specific levels. Takes precedence over series options,
* but not point options.
*
* @sample highcharts/demo/sunburst
* Sunburst chart
*
* @type {Array<*>}
* @since 7.1.0
* @apioption plotOptions.sankey.levels
*/
/**
* Can set `borderColor` on all points which lies on the same level.
*
* @type {Highcharts.ColorString}
* @apioption plotOptions.sankey.levels.borderColor
*/
/**
* Can set `borderWidth` on all points which lies on the same level.
*
* @type {number}
* @apioption plotOptions.sankey.levels.borderWidth
*/
/**
* Can set `color` on all points which lies on the same level.
*
* @type {Highcharts.ColorString|Highcharts.GradientColorObject|Highcharts.PatternObject}
* @apioption plotOptions.sankey.levels.color
*/
/**
* Can set `colorByPoint` on all points which lies on the same level.
*
* @type {boolean}
* @apioption plotOptions.sankey.levels.colorByPoint
*/
/**
* Can set `dataLabels` on all points which lies on the same level.
*
* @type {object}
* @apioption plotOptions.sankey.levels.dataLabels
*/
/**
* Decides which level takes effect from the options set in the levels
* object.
*
* @type {number}
* @apioption plotOptions.sankey.levels.level
*/
/**
* Can set `linkOpacity` on all points which lies on the same level.
*
* @type {number}
* @apioption plotOptions.sankey.levels.linkOpacity
*/
/**
* Can set `states` on all points which lies on the same level.
*
* @type {object}
* @apioption plotOptions.sankey.levels.states
*/
/**
* Opacity for the links between nodes in the sankey diagram.
*/
<<<<<<<
/**
* A callback for defining the format for _nodes_ in the sankey
* chart's tooltip, as opposed to links.
*
* @type {Highcharts.FormatterCallbackFunction<Highcharts.SankeyNodeObject>}
* @since 6.0.2
* @apioption plotOptions.sankey.tooltip.nodeFormatter
*/
=======
/**
* A callback for defining the format for _nodes_ in the chart's
* tooltip, as opposed to links.
*
* @type {Highcharts.FormatterCallbackFunction<object>}
* @since 6.0.2
* @apioption plotOptions.sankey.tooltip.nodeFormatter
*/
>>>>>>>
/**
* A callback for defining the format for _nodes_ in the chart's
* tooltip, as opposed to links.
*
* @type {Highcharts.FormatterCallbackFunction<Highcharts.SankeyNodeObject>}
* @since 6.0.2
* @apioption plotOptions.sankey.tooltip.nodeFormatter
*/
<<<<<<<
* The
* [format string](https://www.highcharts.com/docs/chart-concepts/labels-and-string-formatting)
* specifying what to show for _nodes_ in tooltip of a sankey
* diagram series, as opposed to links.
*/
=======
* The
* [format string](https://www.highcharts.com/docs/chart-concepts/labels-and-string-formatting)
* specifying what to show for _nodes_ in tooltip of a diagram
* series, as opposed to links.
*/
>>>>>>>
* The
* [format string](https://www.highcharts.com/docs/chart-concepts/labels-and-string-formatting)
* specifying what to show for _nodes_ in tooltip of a diagram
* series, as opposed to links.
*/
<<<<<<<
setState: H.NodesMixin.setNodeState,
=======
applyOptions: function (options, x) {
Point.prototype.applyOptions.call(this, options, x);
// Treat point.level as a synonym of point.column
if (defined(this.options.level)) {
this.options.column = this.column = this.options.level;
}
return this;
},
>>>>>>>
applyOptions: function (options, x) {
Point.prototype.applyOptions.call(this, options, x);
// Treat point.level as a synonym of point.column
if (defined(this.options.level)) {
this.options.column = this.column = this.options.level;
}
return this;
},
setState: H.NodesMixin.setNodeState, |
<<<<<<<
H.isNumber = function (n) {
return typeof n === 'number';
};
H.log2lin = function (num) {
return Math.log(num) / Math.LN10;
};
H.lin2log = function (num) {
return Math.pow(10, num);
};
=======
var isNumber = Highcharts.isNumber = function isNumber(n) {
return typeof n === 'number' && !isNaN(n);
};
>>>>>>>
H.isNumber = function (n) {
return typeof n === 'number' && !isNaN(n);
};
<<<<<<<
H.dateFormat = function (format, timestamp, capitalize) {
if (!H.defined(timestamp) || isNaN(timestamp)) {
return H.defaultOptions.lang.invalidDate || '';
=======
dateFormat = function (format, timestamp, capitalize) {
if (!isNumber(timestamp)) {
return defaultOptions.lang.invalidDate || '';
>>>>>>>
H.dateFormat = function (format, timestamp, capitalize) {
if (!H.isNumber(timestamp)) {
return H.defaultOptions.lang.invalidDate || '';
<<<<<<<
pad = H.pad,
=======
shortWeekdays = lang.shortWeekdays,
>>>>>>>
shortWeekdays = lang.shortWeekdays,
pad = H.pad,
<<<<<<<
H.map = function (arr, fn) {
var results = [], i = 0, len = arr.length;
=======
map = function (arr, fn) {
var results = [],
i = 0,
len = arr.length;
>>>>>>>
H.map = function (arr, fn) {
var results = [],
i = 0,
len = arr.length;
<<<<<<<
opt.easing = Math[opt.easing] || Math.easeInOutSine;
opt.curAnim = H.merge(params);
=======
opt.easing = typeof opt.easing === 'function' ? opt.easing : (Math[opt.easing] || Math.easeInOutSine);
opt.curAnim = merge(params);
>>>>>>>
opt.easing = typeof opt.easing === 'function' ? opt.easing : (Math[opt.easing] || Math.easeInOutSine);
opt.curAnim = H.merge(params); |
<<<<<<<
* @sample {highstock} stock/tooltip/split-positioner/
* Split tooltip with fixed positions
* @since 2.2.4
* @apioption tooltip.positioner
=======
*
* @type {Function}
* @since 2.2.4
* @apioption tooltip.positioner
>>>>>>>
* @sample {highstock} stock/tooltip/split-positioner/
* Split tooltip with fixed positions
*
* @type {Function}
* @since 2.2.4
* @apioption tooltip.positioner |
<<<<<<<
if (this.hasZoom || this.followTouchMove) {
H.css(chart.container, {
'-ms-touch-action': 'none',
'touch-action': 'none'
=======
if (this.hasZoom) { // #4014
css(chart.container, {
'-ms-touch-action': NONE,
'touch-action': NONE
>>>>>>>
if (this.hasZoom) { // #4014
H.css(chart.container, {
'-ms-touch-action': 'none',
'touch-action': 'none' |
<<<<<<<
import '../Series/Waterfall/WaterfallSeries.js';
import '../Series/PolygonSeries.js';
=======
import '../Series/WaterfallSeries.js';
import '../Series/Polygon/PolygonSeries.js';
>>>>>>>
import '../Series/Waterfall/WaterfallSeries.js';
import '../Series/Polygon/PolygonSeries.js'; |
<<<<<<<
innerCorrection = (innerRadius && 0.25 / innerRadius) || 0;
=======
innerCorrection = (innerRadius && 0.1 / innerRadius) || 0,
ret;
>>>>>>>
innerCorrection = (innerRadius && 0.1 / innerRadius) || 0,
ret;
<<<<<<<
// Set the new position, and show or hide
if (show) {
label[tick.isNew ? 'attr' : 'animate']({
x: label.x,
y: label.y
});
label.show();
tick.isNew = false;
} else {
label.hide();
}
=======
label[tick.isNew ? 'attr' : 'animate'](xy);
>>>>>>>
// Set the new position, and show or hide
if (show) {
label[tick.isNew ? 'attr' : 'animate'](xy);
label.show();
tick.isNew = false;
} else {
label.hide();
}
<<<<<<<
isDirtyAxisLength = axis.len !== axis.oldAxisLength;
=======
>>>>>>>
isDirtyAxisLength = axis.len !== axis.oldAxisLength; |
<<<<<<<
import AST from './Renderer/HTML/AST.js';
var addEvent = U.addEvent, animate = U.animate, createElement = U.createElement, css = U.css, defined = U.defined, erase = U.erase, error = U.error, extend = U.extend, fireEvent = U.fireEvent, isArray = U.isArray, isNumber = U.isNumber, isObject = U.isObject, isString = U.isString, merge = U.merge, objectEach = U.objectEach, pick = U.pick, relativeLength = U.relativeLength, setAnimation = U.setAnimation, splat = U.splat;
import './Series/Series.js';
var Series = H.Series, seriesTypes = H.seriesTypes;
=======
var addEvent = U.addEvent, createElement = U.createElement, css = U.css, defined = U.defined, erase = U.erase, error = U.error, extend = U.extend, fireEvent = U.fireEvent, isArray = U.isArray, isNumber = U.isNumber, isObject = U.isObject, isString = U.isString, merge = U.merge, objectEach = U.objectEach, pick = U.pick, relativeLength = U.relativeLength, splat = U.splat;
>>>>>>>
import AST from './Renderer/HTML/AST.js';
var addEvent = U.addEvent, createElement = U.createElement, css = U.css, defined = U.defined, erase = U.erase, error = U.error, extend = U.extend, fireEvent = U.fireEvent, isArray = U.isArray, isNumber = U.isNumber, isObject = U.isObject, isString = U.isString, merge = U.merge, objectEach = U.objectEach, pick = U.pick, relativeLength = U.relativeLength, splat = U.splat; |
<<<<<<<
$('#width').bind('input', function () {
chart.setSize(this.value, 400, false);
=======
$('#width').on('input', function () {
$('#container').highcharts().setSize(this.value, 400, false);
>>>>>>>
$('#width').on('input', function () {
chart.setSize(this.value, 400, false); |
<<<<<<<
chart.mouseIsDown = hasDragged = false;
=======
chart.cancelClick = hasDragged; // #370
chart.mouseIsDown = mouseIsDown = hasDragged = false;
>>>>>>>
chart.cancelClick = hasDragged; // #370
chart.mouseIsDown = hasDragged = false;
<<<<<<<
// issue #295, dragging not always working in Firefox
if (!hasTouch && e.preventDefault) {
e.preventDefault();
}
=======
// record the start position
chart.mouseIsDown = mouseIsDown = true;
chart.cancelClick = false;
chart.mouseDownX = mouseDownX = e.chartX;
mouseDownY = e.chartY;
>>>>>>>
// issue #295, dragging not always working in Firefox
if (!hasTouch && e.preventDefault) {
e.preventDefault();
} |
<<<<<<<
gulp.task('tsc', () => require('./tools/gulptasks/tsc')());
gulp.task('tslint', gulp.series('tsc', () => require('./tools/gulptasks/tslint')()));
/* *
*
* Core Functionality
*
* */
=======
>>>>>>>
gulp.task('tsc', () => require('./tools/gulptasks/tsc')());
gulp.task('tslint', gulp.series('tsc', () => require('./tools/gulptasks/tslint')()));
/* *
*
* Core Functionality
*
* */
<<<<<<<
=======
gulp.task('lint', gulp.series(gulp.parallel('update'), lint));
gulp.task('lint-samples', gulp.series(gulp.parallel('update'), lintSamples));
>>>>>>> |
<<<<<<<
if ((e.pointerType === 'touch' || e.pointerType === e.MSPOINTER_TYPE_TOUCH) && charts[H.hoverChartIndex]) {
callback(e);
p = charts[H.hoverChartIndex].pointer;
=======
if ((e.pointerType === 'touch' || e.pointerType === e.MSPOINTER_TYPE_TOUCH) && charts[hoverChartIndex]) {
func(e);
p = charts[hoverChartIndex].pointer;
>>>>>>>
if ((e.pointerType === 'touch' || e.pointerType === e.MSPOINTER_TYPE_TOUCH) && charts[H.hoverChartIndex]) {
func(e);
p = charts[H.hoverChartIndex].pointer; |
<<<<<<<
=======
// Preliminary code in prepraration for HC5 that uses pointAttribs for all series
pointAttribs = series.pointAttribs(point);
point.pointAttr = {
'': pointAttribs,
'hover': series.pointAttribs(point, 'hover'),
'select': {}
};
// Crisp correction
if (point.shapeArgs) {
crispCorr = parseInt(pointAttribs['stroke-width'], 10) % 2 / 2;
point.shapeArgs.x -= crispCorr;
point.shapeArgs.y -= crispCorr;
}
>>>>>>> |
<<<<<<<
if (xhr.status != 200) {
cb({status: xhr.status, response: xhr.response}, null);
=======
// .status will be 0 when requests are filled via app cache on at least iOS 4.x
if (xhr.status != 200 && xhr.status != 0) {
cb(xhr.response, null);
>>>>>>>
// .status will be 0 when requests are filled via app cache on at least iOS 4.x
if (xhr.status != 200 && xhr.status != 0) {
cb({status: xhr.status, response: xhr.response}, null); |
<<<<<<<
drawTracker: PointTrackerMixin.drawTracker, // was columnSeries.prototype.drawTracker before
=======
takeOrdinalPosition: false, // #2342
drawTracker: ColumnSeries.prototype.drawTracker,
>>>>>>>
takeOrdinalPosition: false, // #2342
drawTracker: PointTrackerMixin.drawTracker, |
<<<<<<<
this.renderer.addTree(this.getTableTree(), this.dataTableDiv);
=======
this.isDataTableVisible = true;
>>>>>>>
this.isDataTableVisible = true;
this.renderer.addTree(this.getTableTree(), this.dataTableDiv); |
<<<<<<<
=======
correctFloat = H.correctFloat,
each = H.each,
>>>>>>>
correctFloat = H.correctFloat, |
<<<<<<<
createSettings = require('./features/create-settings');
enableImagePreview = require('./features/image-preview').enablePreview;
=======
createSettings = require('./features/create-settings'),
enableTheatreMode = require('./features/auto-theatre-mode');
>>>>>>>
createSettings = require('./features/create-settings');
enableImagePreview = require('./features/image-preview').enablePreview;
enableTheatreMode = require('./features/auto-theatre-mode');
<<<<<<<
if (bttv.settings.get('chatImagePreview') === true) {
enableImagePreview();
}
=======
if (bttv.settings.get('autoTheatreMode') === true) {
enableTheatreMode();
}
>>>>>>>
if (bttv.settings.get('chatImagePreview') === true) {
enableImagePreview();
}
if (bttv.settings.get('autoTheatreMode') === true) {
enableTheatreMode();
} |
<<<<<<<
var SVG_NS = 'http://www.w3.org/2000/svg',
svg = !!document.createElementNS && !!document.createElementNS(SVG_NS, 'svg').createSVGRect,
isIE = /(msie|trident)/i.test(userAgent) && !window.opera,
useCanVG = !svg && !isIE && !!document.createElement('canvas').getContext,
userAgent = navigator.userAgent,
isFirefox = /Firefox/.test(userAgent),
hasBidiBug = isFirefox && parseInt(userAgent.split('Firefox/')[1], 10) < 4; // issue #38
window.Highcharts = window.Highcharts ? window.Highcharts.error(16, true) : {
deg2rad: Math.PI * 2 / 360,
hasBidiBug: hasBidiBug,
isIE: isIE,
isWebKit: /AppleWebKit/.test(userAgent),
isFirefox: isFirefox,
isTouchDevice: /(Mobile|Android|Windows Phone)/.test(userAgent),
SVG_NS: SVG_NS,
idCounter: 0,
chartCount: 0,
seriesTypes: {},
svg: svg,
timeUnits: {
millisecond: 1,
second: 1000,
minute: 60000,
hour: 3600000,
day: 24 * 3600000,
week: 7 * 24 * 3600000,
month: 28 * 24 * 3600000,
year: 364 * 24 * 3600000
},
useCanVG: useCanVG,
charts: [],
noop: function () {}
};
=======
// encapsulated variables
var UNDEFINED,
doc = document,
win = window,
math = Math,
mathRound = math.round,
mathFloor = math.floor,
mathCeil = math.ceil,
mathMax = math.max,
mathMin = math.min,
mathAbs = math.abs,
mathCos = math.cos,
mathSin = math.sin,
mathPI = math.PI,
deg2rad = mathPI * 2 / 360,
// some variables
userAgent = navigator.userAgent,
isOpera = win.opera,
isIE = /(msie|trident)/i.test(userAgent) && !isOpera,
docMode8 = doc.documentMode === 8,
isWebKit = /AppleWebKit/.test(userAgent),
isFirefox = /Firefox/.test(userAgent),
isTouchDevice = /(Mobile|Android|Windows Phone)/.test(userAgent),
SVG_NS = 'http://www.w3.org/2000/svg',
hasSVG = !!doc.createElementNS && !!doc.createElementNS(SVG_NS, 'svg').createSVGRect,
hasBidiBug = isFirefox && parseInt(userAgent.split('Firefox/')[1], 10) < 4, // issue #38
useCanVG = !hasSVG && !isIE && !!doc.createElement('canvas').getContext,
Renderer,
hasTouch,
symbolSizes = {},
idCounter = 0,
garbageBin,
defaultOptions,
dateFormat, // function
globalAnimation,
pathAnim,
timeUnits,
noop = function () { return UNDEFINED; },
charts = [],
chartCount = 0,
PRODUCT = 'Highstock',
VERSION = '2.1.5-modified',
// some constants for frequently used strings
DIV = 'div',
ABSOLUTE = 'absolute',
RELATIVE = 'relative',
HIDDEN = 'hidden',
PREFIX = 'highcharts-',
VISIBLE = 'visible',
PX = 'px',
NONE = 'none',
M = 'M',
L = 'L',
numRegex = /^[0-9]+$/,
NORMAL_STATE = '',
HOVER_STATE = 'hover',
SELECT_STATE = 'select',
marginNames = ['plotTop', 'marginRight', 'marginBottom', 'plotLeft'],
// Object for extending Axis
AxisPlotLineOrBandExtension,
// constants for attributes
STROKE_WIDTH = 'stroke-width',
// time methods, changed based on whether or not UTC is used
Date, // Allow using a different Date class
makeTime,
timezoneOffset,
getTimezoneOffset,
getMinutes,
getHours,
getDay,
getDate,
getMonth,
getFullYear,
setMilliseconds,
setSeconds,
setMinutes,
setHours,
setDate,
setMonth,
setFullYear,
// lookup over the types and the associated classes
seriesTypes = {},
Highcharts;
// The Highcharts namespace
Highcharts = win.Highcharts = win.Highcharts ? error(16, true) : {};
Highcharts.seriesTypes = seriesTypes;
>>>>>>>
var SVG_NS = 'http://www.w3.org/2000/svg',
svg = !!document.createElementNS && !!document.createElementNS(SVG_NS, 'svg').createSVGRect,
isIE = /(msie|trident)/i.test(userAgent) && !window.opera,
useCanVG = !svg && !isIE && !!document.createElement('canvas').getContext,
userAgent = navigator.userAgent,
isFirefox = /Firefox/.test(userAgent),
hasBidiBug = isFirefox && parseInt(userAgent.split('Firefox/')[1], 10) < 4; // issue #38
window.Highcharts = window.Highcharts ? window.Highcharts.error(16, true) : {
deg2rad: Math.PI * 2 / 360,
hasBidiBug: hasBidiBug,
isIE: isIE,
isWebKit: /AppleWebKit/.test(userAgent),
isFirefox: isFirefox,
isTouchDevice: /(Mobile|Android|Windows Phone)/.test(userAgent),
SVG_NS: SVG_NS,
idCounter: 0,
chartCount: 0,
seriesTypes: {},
svg: svg,
timeUnits: {
millisecond: 1,
second: 1000,
minute: 60000,
hour: 3600000,
day: 24 * 3600000,
week: 7 * 24 * 3600000,
month: 28 * 24 * 3600000,
year: 364 * 24 * 3600000
},
useCanVG: useCanVG,
charts: [],
noop: function () {}
};
<<<<<<<
if (hasContrast) { // Apply the altered style
Highcharts.css(elem, {
textShadow: textShadow
});
}
=======
css(elem, styles); // Apply altered textShadow or textRendering workaround
>>>>>>>
Highcharts.css(elem, styles); // Apply altered textShadow or textRendering workaround
<<<<<<<
wordStr = span.substring(0, wordStr.length + (tooLong ? -1 : 1) * Math.ceil(cursor));
words = [wordStr + '\u2026'];
=======
wordStr = span.substring(0, wordStr.length + (tooLong ? -1 : 1) * mathCeil(cursor));
words = [wordStr + (width > 3 ? '\u2026' : '')];
>>>>>>>
wordStr = span.substring(0, wordStr.length + (tooLong ? -1 : 1) * Math.ceil(cursor));
words = [wordStr + (width > 3 ? '\u2026' : '')];
<<<<<<<
if (y !== undefined) {
// As a workaround for #3649, use translation instead of y attribute. #3649
// is a rendering bug in WebKit for Retina (Mac, iOS, PhantomJS) that
// results in duplicated text when an y attribute is used in combination
// with a CSS text-style.
text.attr(text.element.nodeName === 'SPAN' ? 'y' : 'translateY', y);
=======
if (y !== UNDEFINED) {
text.attr('y', y);
>>>>>>>
if (y !== undefined) {
text.attr('y', y);
<<<<<<<
if (!isDatetimeAxis && !isLog) { // linear
if (!tickIntervalOption) {
axis.tickInterval = H.normalizeTickInterval(
axis.tickInterval,
null,
H.getMagnitude(axis.tickInterval),
// If the tick interval is between 0.5 and 5 and the axis max is in the order of
// thousands, chances are we are dealing with years. Don't allow decimals. #3363.
pick(options.allowDecimals, !(axis.tickInterval > 0.5 && axis.tickInterval < 5 && axis.max > 1000 && axis.max < 9999)),
!!this.tickAmount
);
}
=======
if (!isDatetimeAxis && !isLog && !tickIntervalOption) {
axis.tickInterval = normalizeTickInterval(
axis.tickInterval,
null,
getMagnitude(axis.tickInterval),
// If the tick interval is between 0.5 and 5 and the axis max is in the order of
// thousands, chances are we are dealing with years. Don't allow decimals. #3363.
pick(options.allowDecimals, !(axis.tickInterval > 0.5 && axis.tickInterval < 5 && axis.max > 1000 && axis.max < 9999)),
!!this.tickAmount
);
>>>>>>>
if (!isDatetimeAxis && !isLog && !tickIntervalOption) {
axis.tickInterval = H.normalizeTickInterval(
axis.tickInterval,
null,
H.getMagnitude(axis.tickInterval),
// If the tick interval is between 0.5 and 5 and the axis max is in the order of
// thousands, chances are we are dealing with years. Don't allow decimals. #3363.
pick(options.allowDecimals, !(axis.tickInterval > 0.5 && axis.tickInterval < 5 && axis.max > 1000 && axis.max < 9999)),
!!this.tickAmount
);
<<<<<<<
fontSize = H.pInt(axisTitleOptions.style.fontSize || 12),
=======
xOption = axisTitleOptions.x || 0, // docs
yOption = axisTitleOptions.y || 0,
fontSize = pInt(axisTitleOptions.style.fontSize || 12),
>>>>>>>
xOption = axisTitleOptions.x || 0, // docs
yOption = axisTitleOptions.y || 0,
fontSize = H.pInt(axisTitleOptions.style.fontSize || 12),
<<<<<<<
Math.round(pos.x),
Math.round(pos.y),
=======
mathRound(pos.x),
mathRound(pos.y || 0), // can be undefined (#3977)
>>>>>>>
Math.round(pos.x),
Math.round(pos.y || 0), // can be undefined (#3977)
<<<<<<<
timeUnits = H.timeUnits,
lastN;
=======
lastN = 'millisecond'; // for sub-millisecond data, #4223
>>>>>>>
timeUnits = H.timeUnits,
lastN = 'millisecond'; // for sub-millisecond data, #4223
<<<<<<<
if (this.hasZoom || this.followTouchMove) {
H.css(chart.container, {
'-ms-touch-action': 'none',
'touch-action': 'none'
=======
if (this.hasZoom) { // #4014
css(chart.container, {
'-ms-touch-action': NONE,
'touch-action': NONE
>>>>>>>
if (this.hasZoom) { // #4014
H.css(chart.container, {
'-ms-touch-action': 'none',
'touch-action': 'none'
<<<<<<<
options.labelFormat ? H.format(options.labelFormat, item) : options.labelFormatter.call(item),
=======
'',
>>>>>>>
'',
<<<<<<<
if (yBottom === 0) {
yBottom = Highcharts.pick(threshold, yAxis.min);
=======
if (yBottom === stackThreshold) {
yBottom = pick(threshold, yAxis.min);
>>>>>>>
if (yBottom === stackThreshold) {
yBottom = Highcharts.pick(threshold, yAxis.min);
<<<<<<<
pointAttr[''] = series.convertAttribs(Highcharts.extend(attr, normalOptions), seriesPointAttr['']);
=======
// Color is explicitly set to null or undefined (#1288, #4068)
if (normalOptions.hasOwnProperty('color') && !normalOptions.color) {
delete normalOptions.color;
}
pointAttr[NORMAL_STATE] = series.convertAttribs(extend(attr, normalOptions), seriesPointAttr[NORMAL_STATE]);
>>>>>>>
// Color is explicitly set to null or undefined (#1288, #4068)
if (normalOptions.hasOwnProperty('color') && !normalOptions.color) {
delete normalOptions.color;
}
pointAttr[''] = series.convertAttribs(Highcharts.extend(attr, normalOptions), seriesPointAttr['']);
<<<<<<<
// destroy all SVGElements associated to the series
Highcharts.each(['area', 'graph', 'dataLabelsGroup', 'group', 'markerGroup', 'tracker',
'graphNeg', 'areaNeg', 'posClip', 'negClip'], function (prop) {
if (series[prop]) {
=======
// Destroy all SVGElements associated to the series
for (prop in series) {
if (series[prop] instanceof SVGElement && !series[prop].survive) { // Survive provides a hook for not destroying
>>>>>>>
// Destroy all SVGElements associated to the series
for (prop in series) {
if (series[prop] instanceof Highcharts.SVGElement && !series[prop].survive) { // Survive provides a hook for not destroying
<<<<<<<
Highcharts.each(zones, function (threshold, i) {
props.push(['colorGraph' + i, threshold.color || series.color, threshold.dashStyle || options.dashStyle]);
=======
each(zones, function (threshold, i) {
props.push(['zoneGraph' + i, threshold.color || series.color, threshold.dashStyle || options.dashStyle]);
>>>>>>>
Highcharts.each(zones, function (threshold, i) {
props.push(['zoneGraph' + i, threshold.color || series.color, threshold.dashStyle || options.dashStyle]);
<<<<<<<
Highcharts.each(zones, function (threshold, i) {
translatedFrom = pick(translatedTo, (reversed ? (horiz ? chart.plotWidth : 0) : (horiz ? 0 : axis.toPixels(axis.min))));
translatedTo = Math.round(axis.toPixels(pick(threshold.value, axis.max), true));
=======
extremes = axis.getExtremes();
each(zones, function (threshold, i) {
>>>>>>>
extremes = axis.getExtremes();
Highcharts.each(zones, function (threshold, i) {
<<<<<<<
defined = Highcharts.defined,
kdComparer = this.kdComparer,
=======
>>>>>>>
defined = Highcharts.defined,
<<<<<<<
if (Highcharts.isObject(options) && !Highcharts.isArray(options)) {
=======
if (point.y === null && graphic) { // #4146
point.graphic = graphic.destroy();
}
if (isObject(options) && !isArray(options)) {
>>>>>>>
if (point.y === null && graphic) { // #4146
point.graphic = graphic.destroy();
}
if (Highcharts.isObject(options) && !Highcharts.isArray(options)) {
<<<<<<<
Highcharts.each([graph, area, series.graphNeg, series.areaNeg], function (shape) {
if (shape) {
shape.shift = currentShift + 1;
=======
i = series.zones.length;
while (i--) {
shiftShapes.push('zoneGraph' + i, 'zoneArea' + i);
}
each(shiftShapes, function (shape) {
if (series[shape]) {
series[shape].shift = currentShift + 1;
>>>>>>>
i = series.zones.length;
while (i--) {
shiftShapes.push('zoneGraph' + i, 'zoneArea' + i);
}
Highcharts.each(shiftShapes, function (shape) {
if (series[shape]) {
series[shape].shift = currentShift + 1;
<<<<<<<
Highcharts.each(zones, function (threshold, i) {
props.push(['colorArea' + i, threshold.color || series.color, threshold.fillColor || options.fillColor]);
=======
each(zones, function (threshold, i) {
props.push(['zoneArea' + i, threshold.color || series.color, threshold.fillColor || options.fillColor]);
>>>>>>>
Highcharts.each(zones, function (threshold, i) {
props.push(['zoneArea' + i, threshold.color || series.color, threshold.fillColor || options.fillColor]);
<<<<<<<
barH = Math.max(plotY, yBottom) - barY;
=======
up,
barH = mathMax(plotY, yBottom) - barY;
>>>>>>>
up,
barH = Math.max(plotY, yBottom) - barY;
<<<<<<<
graphic.animate(Highcharts.extend(shapeArgs, groupTranslation));
=======
graphic.animate(extend(shapeArgs, groupTranslation));
>>>>>>>
graphic.animate(Highcharts.extend(shapeArgs, groupTranslation));
<<<<<<<
center[2] = newSize;
this.translate(center);
Highcharts.each(this.points, function (point) {
=======
this.center = this.getCenter(newSize);
this.translate(this.center);
each(this.points, function (point) {
>>>>>>>
this.center = this.getCenter(newSize);
this.translate(this.center);
Highcharts.each(this.points, function (point) {
<<<<<<<
addEvent = Highcharts.addEvent;
=======
pick = H.pick,
addEvent = HighchartsAdapter.addEvent;
>>>>>>>
pick = H.pick,
addEvent = HighchartsAdapter.addEvent;
<<<<<<<
css(this, {
left: (inputGroup.translateX + dateBox.x) + 'px',
top: inputGroup.translateY + 'px',
width: (dateBox.width - 2) + 'px',
height: (dateBox.height - 2) + 'px',
border: '2px solid silver'
});
=======
rangeSelector.showInput(name);
>>>>>>>
rangeSelector.showInput(name);
<<<<<<<
if (!this.clipBox && this.animate && this.animate.toString().indexOf('sharedClip') !== -1) {
this.clipBox = Highcharts.merge(this.chart.clipBox);
=======
if (!this.clipBox && this.animate) {
this.clipBox = merge(this.chart.clipBox);
>>>>>>>
if (!this.clipBox && this.animate) {
this.clipBox = Highcharts.merge(this.chart.clipBox); |
<<<<<<<
);
QUnit.test('The lastPrice color, #15074.', function (assert) {
const chart = Highcharts.stockChart('container', {
stockTools: {
gui: {
enabled: true,
buttons: ['currentPriceIndicator']
}
},
series: [{
data: [1, 2, 4, 6, 1, 5, 2.5],
lastPrice: {
enabled: true,
color: '#00ff00'
}
}]
}),
button = chart.stockTools.listWrapper.childNodes[0].childNodes[0];
assert.strictEqual(
chart.series[0].lastPrice.attr('stroke'),
'#00ff00',
'The lastPrice color should be as declared in the options.'
);
// Toggle the currentPriceIndicator button in the stock tools.
chart.navigationBindings.options.bindings.currentPriceIndicator.init.call(
chart.navigationBindings, button);
chart.navigationBindings.options.bindings.currentPriceIndicator.init.call(
chart.navigationBindings, button);
assert.strictEqual(
chart.series[0].lastPrice.attr('stroke'),
'#00ff00',
'The lastPrice color should remain the same after toggle.'
);
});
=======
);
QUnit.test(`The currentPriceIndicator, lastPrice and axis crosshair
didn't work properly with stockTools, #13876.`,
function (assert) {
const chart = Highcharts.stockChart('container', {
stockTools: {
gui: {
enabled: true,
buttons: ['currentPriceIndicator']
}
},
yAxis: [{
crosshair: {
color: '#0000ff',
label: {
padding: 6,
backgroundColor: '#0000ff',
enabled: true
}
}
}],
series: [{
data: [1, 2, 4, 6, 1, 4, 6, 4, 3, 2],
lastVisiblePrice: {
color: '#00ff00',
label: {
enabled: true,
backgroundColor: '#00ff00'
}
},
lastPrice: {
color: 'red'
}
}]
}),
controller = new TestController(chart),
button = chart.stockTools.listWrapper.childNodes[0].childNodes[0];
// Show croshair with the label.
controller.moveTo(200, 200);
assert.strictEqual(
chart.yAxis[0].crossLabel.element.getAttribute('visibility'),
'visible',
'Axis cross label should be visible.'
);
assert.strictEqual(
chart.yAxis[0].crossLabel.element.childNodes[0].getAttribute('fill'),
'#0000ff',
'Axis cross label fill color should be blue.'
);
// Hide croshair with the label.
controller.moveTo(30, 20);
assert.strictEqual(
chart.yAxis[0].crossLabel.element.getAttribute('visibility'),
'hidden',
'Cross label should not be visible.'
);
// Show currentPriceIndicator with the label.
chart.navigationBindings.options.bindings.currentPriceIndicator.init.call(
chart.navigationBindings, button);
assert.strictEqual(
chart.series[0].crossLabel.element.getAttribute('visibility'),
'visible',
'Series price indicator should be visible.'
);
assert.strictEqual(
chart.series[0].crossLabel.element.childNodes[0].getAttribute('fill'),
'#00ff00',
'Cross label fill color should be blue.'
);
// Show currentPriceIndicator togehter with axis croshair.
controller.moveTo(200, 200);
assert.strictEqual(
chart.yAxis[0].crossLabel.element.getAttribute('visibility'),
'visible',
'Cross label should be visible.'
);
assert.strictEqual(
chart.yAxis[0].crossLabel.element.childNodes[0].getAttribute('fill'),
'#0000ff',
'Cross label fill color should be blue.'
);
// Adjust extremes to show the lastPrice line.
chart.xAxis[0].setExtremes(0, 4);
assert.strictEqual(
chart.series[0].crossLabel.element.getAttribute('visibility'),
'visible',
'Series last price indicator should be visible.'
);
assert.strictEqual(
chart.series[0].lastPrice.stroke,
'red',
'Cross label fill color should be red.'
);
// Hide lastPrice and currentPriceIndicator.
chart.navigationBindings.options.bindings.currentPriceIndicator.init.call(
chart.navigationBindings, button);
assert.notOk(
chart.series[0].crossLabel,
'Series price indicator should not exist.'
);
assert.notOk(
chart.series[0].lastPrice,
'Series last price indicator should not exist.'
);
// Show again the lastPrice and currentPriceIndicator.
chart.navigationBindings.options.bindings.currentPriceIndicator.init.call(
chart.navigationBindings, button);
assert.strictEqual(
chart.yAxis[0].crossLabel.element.getAttribute('visibility'),
'visible',
'Cross label should be visible again.'
);
assert.strictEqual(
chart.yAxis[0].crossLabel.element.childNodes[0].getAttribute('fill'),
'#0000ff',
'Cross label fill color should be blue again.'
);
assert.strictEqual(
chart.series[0].crossLabel.element.getAttribute('visibility'),
'visible',
'Series last price indicator should be visible again.'
);
assert.strictEqual(
chart.series[0].lastPrice.stroke,
'red',
'Cross label fill color should be red again.'
);
});
>>>>>>>
);
QUnit.test(`The currentPriceIndicator, lastPrice and axis crosshair
didn't work properly with stockTools, #13876.`,
function (assert) {
const chart = Highcharts.stockChart('container', {
stockTools: {
gui: {
enabled: true,
buttons: ['currentPriceIndicator']
}
},
yAxis: [{
crosshair: {
color: '#0000ff',
label: {
padding: 6,
backgroundColor: '#0000ff',
enabled: true
}
}
}],
series: [{
data: [1, 2, 4, 6, 1, 4, 6, 4, 3, 2],
lastVisiblePrice: {
color: '#00ff00',
label: {
enabled: true,
backgroundColor: '#00ff00'
}
},
lastPrice: {
color: 'red'
}
}]
}),
controller = new TestController(chart),
button = chart.stockTools.listWrapper.childNodes[0].childNodes[0];
// Show croshair with the label.
controller.moveTo(200, 200);
assert.strictEqual(
chart.yAxis[0].crossLabel.element.getAttribute('visibility'),
'visible',
'Axis cross label should be visible.'
);
assert.strictEqual(
chart.yAxis[0].crossLabel.element.childNodes[0].getAttribute('fill'),
'#0000ff',
'Axis cross label fill color should be blue.'
);
// Hide croshair with the label.
controller.moveTo(30, 20);
assert.strictEqual(
chart.yAxis[0].crossLabel.element.getAttribute('visibility'),
'hidden',
'Cross label should not be visible.'
);
// Show currentPriceIndicator with the label.
chart.navigationBindings.options.bindings.currentPriceIndicator.init.call(
chart.navigationBindings, button);
assert.strictEqual(
chart.series[0].crossLabel.element.getAttribute('visibility'),
'visible',
'Series price indicator should be visible.'
);
assert.strictEqual(
chart.series[0].crossLabel.element.childNodes[0].getAttribute('fill'),
'#00ff00',
'Cross label fill color should be blue.'
);
// Show currentPriceIndicator togehter with axis croshair.
controller.moveTo(200, 200);
assert.strictEqual(
chart.yAxis[0].crossLabel.element.getAttribute('visibility'),
'visible',
'Cross label should be visible.'
);
assert.strictEqual(
chart.yAxis[0].crossLabel.element.childNodes[0].getAttribute('fill'),
'#0000ff',
'Cross label fill color should be blue.'
);
// Adjust extremes to show the lastPrice line.
chart.xAxis[0].setExtremes(0, 4);
assert.strictEqual(
chart.series[0].crossLabel.element.getAttribute('visibility'),
'visible',
'Series last price indicator should be visible.'
);
assert.strictEqual(
chart.series[0].lastPrice.stroke,
'red',
'Cross label fill color should be red.'
);
// Hide lastPrice and currentPriceIndicator.
chart.navigationBindings.options.bindings.currentPriceIndicator.init.call(
chart.navigationBindings, button);
assert.notOk(
chart.series[0].crossLabel,
'Series price indicator should not exist.'
);
assert.notOk(
chart.series[0].lastPrice,
'Series last price indicator should not exist.'
);
// Show again the lastPrice and currentPriceIndicator.
chart.navigationBindings.options.bindings.currentPriceIndicator.init.call(
chart.navigationBindings, button);
assert.strictEqual(
chart.yAxis[0].crossLabel.element.getAttribute('visibility'),
'visible',
'Cross label should be visible again.'
);
assert.strictEqual(
chart.yAxis[0].crossLabel.element.childNodes[0].getAttribute('fill'),
'#0000ff',
'Cross label fill color should be blue again.'
);
assert.strictEqual(
chart.series[0].crossLabel.element.getAttribute('visibility'),
'visible',
'Series last price indicator should be visible again.'
);
assert.strictEqual(
chart.series[0].lastPrice.stroke,
'red',
'Cross label fill color should be red again.'
);
});
QUnit.test('The lastPrice color, #15074.', function (assert) {
const chart = Highcharts.stockChart('container', {
stockTools: {
gui: {
enabled: true,
buttons: ['currentPriceIndicator']
}
},
series: [{
data: [1, 2, 4, 6, 1, 5, 2.5],
lastPrice: {
enabled: true,
color: '#00ff00'
}
}]
}),
button = chart.stockTools.listWrapper.childNodes[0].childNodes[0];
assert.strictEqual(
chart.series[0].lastPrice.attr('stroke'),
'#00ff00',
'The lastPrice color should be as declared in the options.'
);
// Toggle the currentPriceIndicator button in the stock tools.
chart.navigationBindings.options.bindings.currentPriceIndicator.init.call(
chart.navigationBindings, button);
chart.navigationBindings.options.bindings.currentPriceIndicator.init.call(
chart.navigationBindings, button);
assert.strictEqual(
chart.series[0].lastPrice.attr('stroke'),
'#00ff00',
'The lastPrice color should remain the same after toggle.'
);
}); |
<<<<<<<
=======
/*= if (build.classic) { =*/
>>>>>>>
<<<<<<<
=======
/*= } =*/
>>>>>>>
<<<<<<<
=======
/*= if (build.classic) { =*/
>>>>>>>
<<<<<<<
if (!chart.styledMode) {
css(innerMenu, extend({
MozBoxShadow: '3px 3px 10px #888',
WebkitBoxShadow: '3px 3px 10px #888',
boxShadow: '3px 3px 10px #888'
}, navOptions.menuStyle));
}
=======
css(innerMenu, extend({
MozBoxShadow: '3px 3px 10px #888',
WebkitBoxShadow: '3px 3px 10px #888',
boxShadow: '3px 3px 10px #888'
}, navOptions.menuStyle));
/*= } =*/
>>>>>>>
if (!chart.styledMode) {
css(innerMenu, extend({
MozBoxShadow: '3px 3px 10px #888',
WebkitBoxShadow: '3px 3px 10px #888',
boxShadow: '3px 3px 10px #888'
}, navOptions.menuStyle));
}
<<<<<<<
title: pick(chart.options.lang[btnOptions._titleKey], '')
=======
/*= if (build.classic) { =*/
'stroke-linecap': 'round',
/*= } =*/
title: pick(
chart.options.lang[
btnOptions._titleKey || btnOptions.titleKey
],
''
)
>>>>>>>
title: pick(chart.options.lang[
btnOptions._titleKey || btnOptions.titleKey
], '')
<<<<<<<
if (!chart.styledMode) {
symbol.attr({
stroke: btnOptions.symbolStroke,
fill: btnOptions.symbolFill,
'stroke-width': btnOptions.symbolStrokeWidth || 1
});
}
=======
/*= if (build.classic) { =*/
symbol.attr({
stroke: btnOptions.symbolStroke,
fill: btnOptions.symbolFill,
'stroke-width': btnOptions.symbolStrokeWidth || 1
});
/*= } =*/
>>>>>>>
if (!chart.styledMode) {
symbol.attr({
stroke: btnOptions.symbolStroke,
fill: btnOptions.symbolFill,
'stroke-width': btnOptions.symbolStrokeWidth || 1
});
}
<<<<<<<
=======
/*= if (!build.classic) { =*/
>>>>>>>
<<<<<<<
=======
/*= } =*/
>>>>>>> |
<<<<<<<
htmlGroup = parentGroup.div = parentGroup.div || createElement('div', cls, {
position: 'absolute',
left: (parentGroup.translateX || 0) + 'px',
top: (parentGroup.translateY || 0) + 'px',
=======
htmlGroup = parentGroup.div = parentGroup.div || createElement(DIV, cls, {
position: ABSOLUTE,
left: (parentGroup.translateX || 0) + PX,
top: (parentGroup.translateY || 0) + PX,
display: parentGroup.display,
>>>>>>>
htmlGroup = parentGroup.div = parentGroup.div || createElement('div', cls, {
position: 'absolute',
left: (parentGroup.translateX || 0) + 'px',
top: (parentGroup.translateY || 0) + 'px',
display: parentGroup.display, |
<<<<<<<
// Note: in spite of JSLint's complaints, window == window.top is required
/*jslint eqeq: true*/
if ((!svg && (window == window.top && document.readyState !== 'complete')) || (useCanVG && !window.canvg)) {
/*jslint eqeq: false*/
=======
// Note: win == win.top is required
if ((!hasSVG && (win == win.top && doc.readyState !== 'complete')) || (useCanVG && !win.canvg)) { // eslint-disable-line eqeqeq
>>>>>>>
// Note: win == win.top is required
if ((!hasSVG && (window == window.top && document.readyState !== 'complete')) || (useCanVG && !window.canvg)) { // eslint-disable-line eqeqeq |
<<<<<<<
SVG_NS: SVG_NS,
urlSymbolRX: /^url\((.*?)\)$/,
=======
>>>>>>>
SVG_NS: SVG_NS,
<<<<<<<
if (words.length) {
tspan = doc.createElementNS(renderer.SVG_NS, 'tspan');
=======
if (words.length && !noWrap) {
softLineNo++;
tspan = doc.createElementNS(SVG_NS, 'tspan');
>>>>>>>
if (words.length && !noWrap) {
tspan = doc.createElementNS(SVG_NS, 'tspan');
<<<<<<<
/**
* Width and height setters that take both the image's physical size and the label size into
* consideration, and translates the image to center within the label.
*/
each(['width', 'height'], function (key) {
obj[key + 'Setter'] = function (value, key) {
var attribs = {},
imgSize = this['img' + key];
this[key] = value;
if (defined(imgSize)) {
if (this.element) {
this.element.setAttribute(key, imgSize);
}
if (!this.alignByTranslate) {
attribs[key === 'width' ? 'translateX' : 'translateY'] = (this[key] - imgSize) / 2;
this.attr(attribs);
}
}
};
});
=======
imageSrc = symbol.match(imageRegex)[1];
imageSize = symbolSizes[imageSrc] || (options && options.width && options.height && [options.width, options.height]);
>>>>>>>
/**
* Width and height setters that take both the image's physical size and the label size into
* consideration, and translates the image to center within the label.
*/
each(['width', 'height'], function (key) {
obj[key + 'Setter'] = function (value, key) {
var attribs = {},
imgSize = this['img' + key];
this[key] = value;
if (defined(imgSize)) {
if (this.element) {
this.element.setAttribute(key, imgSize);
}
if (!this.alignByTranslate) {
attribs[key === 'width' ? 'translateX' : 'translateY'] = (this[key] - imgSize) / 2;
this.attr(attribs);
}
}
};
}); |
<<<<<<<
H.isArray = function (obj) {
return Object.prototype.toString.call(obj) === '[object Array]';
};
=======
function isArray(obj) {
var str = Object.prototype.toString.call(obj);
return str === '[object Array]' || str === '[object Array Iterator]';
}
>>>>>>>
H.isArray = function (obj) {
var str = Object.prototype.toString.call(obj);
return str === '[object Array]' || str === '[object Array Iterator]';
}; |
<<<<<<<
// emulate VML's dashstyle implementation
} else if (key === 'dashstyle') {
key = 'stroke-dasharray';
value = value && value.toLowerCase();
if (value === 'solid') {
value = NONE;
} else if (value) {
value = value
.replace('shortdashdotdot', '3,1,1,1,1,1,')
.replace('shortdashdot', '3,1,1,1')
.replace('shortdot', '1,1,')
.replace('shortdash', '3,1,')
.replace('longdash', '8,3,')
.replace(/dot/g, '1,3,')
.replace('dash', '4,3,')
.replace(/,$/, '')
.split(','); // ending comma
i = value.length;
while (i--) {
value[i] = pInt(value[i]) * hash['stroke-width'];
}
value = value.join(',');
}
=======
// Text alignment
} else if (key === 'align') {
key = 'text-anchor';
value = { left: 'start', center: 'middle', right: 'end' }[value];
// Title requires a subnode, #431
} else if (key === 'title') {
var title = doc.createElementNS(SVG_NS, 'title');
title.appendChild(doc.createTextNode(value));
element.appendChild(title);
}
>>>>>>>
// emulate VML's dashstyle implementation
} else if (key === 'dashstyle') {
key = 'stroke-dasharray';
value = value && value.toLowerCase();
if (value === 'solid') {
value = NONE;
} else if (value) {
value = value
.replace('shortdashdotdot', '3,1,1,1,1,1,')
.replace('shortdashdot', '3,1,1,1')
.replace('shortdot', '1,1,')
.replace('shortdash', '3,1,')
.replace('longdash', '8,3,')
.replace(/dot/g, '1,3,')
.replace('dash', '4,3,')
.replace(/,$/, '')
.split(','); // ending comma
i = value.length;
while (i--) {
value[i] = pInt(value[i]) * hash['stroke-width'];
}
value = value.join(',');
}
<<<<<<<
// clipping rectangle special
if (wrapper.updateClipping) {
wrapper[key] = value;
wrapper.updateClipping();
} else {
// normal
elemStyle[key] = value;
}
=======
this[key] = value; // used in getter
// clipping rectangle special
if (this.updateClipping) {
this[key] = value;
this.updateClipping();
>>>>>>>
// clipping rectangle special
if (wrapper.updateClipping) {
wrapper[key] = value;
wrapper.updateClipping();
} else {
// normal
elemStyle[key] = value;
}
<<<<<<<
=======
each(serie.data, function (point) {
var pointX = point.x,
pointY = point.y,
isNegative = pointY < 0,
pointStack = isNegative ? negPointStack : posPointStack,
key = isNegative ? negKey : stackKey,
totalPos,
pointLow;
// initial values
if (dataMin === null) {
// start out with the first point
dataMin = dataMax = point[xOrY];
}
>>>>>>>
<<<<<<<
series = items[0].series,
headerFormat = series.tooltipHeaderFormat || '%A, %b %e, %Y',
=======
>>>>>>>
series = items[0].series,
headerFormat = series.tooltipHeaderFormat || '%A, %b %e, %Y',
<<<<<<<
each(point, function (item, i) {
=======
each(point, function (item) {
/*var series = item.series,
hoverPoint = series.hoverPoint;
if (hoverPoint) {
hoverPoint.setState();
}
series.hoverPoint = item;*/
>>>>>>>
each(point, function (item) {
<<<<<<<
each(axes, function (axis, i) {
if (axis.options.zoomEnabled !== false) {
var translate = axis.translate,
isXAxis = axis.isXAxis,
isHorizontal = inverted ? !isXAxis : isXAxis,
selectionMin = translate(
isHorizontal ?
selectionLeft :
plotHeight - selectionTop - selectionBox.height,
true,
0,
0,
1
),
selectionMax = translate(
isHorizontal ?
selectionLeft + selectionBox.width :
plotHeight - selectionTop,
true,
0,
0,
1
);
selectionData[isXAxis ? 'xAxis' : 'yAxis'].push({
axis: axis,
min: mathMin(selectionMin, selectionMax), // for reversed axes,
max: mathMax(selectionMin, selectionMax)
});
}
=======
each(axes, function (axis) {
var translate = axis.translate,
isXAxis = axis.isXAxis,
isHorizontal = inverted ? !isXAxis : isXAxis,
selectionMin = translate(
isHorizontal ?
selectionLeft :
plotHeight - selectionTop - selectionBox.height,
true,
0,
0,
1
),
selectionMax = translate(
isHorizontal ?
selectionLeft + selectionBox.width :
plotHeight - selectionTop,
true,
0,
0,
1
);
selectionData[isXAxis ? 'xAxis' : 'yAxis'].push({
axis: axis,
min: mathMin(selectionMin, selectionMax), // for reversed axes,
max: mathMax(selectionMin, selectionMax)
});
>>>>>>>
each(axes, function (axis) {
if (axis.options.zoomEnabled !== false) {
var translate = axis.translate,
isXAxis = axis.isXAxis,
isHorizontal = inverted ? !isXAxis : isXAxis,
selectionMin = translate(
isHorizontal ?
selectionLeft :
plotHeight - selectionTop - selectionBox.height,
true,
0,
0,
1
),
selectionMax = translate(
isHorizontal ?
selectionLeft + selectionBox.width :
plotHeight - selectionTop,
true,
0,
0,
1
);
selectionData[isXAxis ? 'xAxis' : 'yAxis'].push({
axis: axis,
min: mathMin(selectionMin, selectionMax), // for reversed axes,
max: mathMax(selectionMin, selectionMax)
});
}
<<<<<<<
series.chart.hoverPoints = null;
=======
>>>>>>>
series.chart.hoverPoints = null;
<<<<<<<
each(points, function (point, i) {
=======
each(data, function (point) {
>>>>>>>
each(points, function (point, i) {
<<<<<<<
clipRect = series.clipRect,
wasDirtyData = series.isDirtyData, // cache it here as it is set to false in render, but used after
=======
>>>>>>>
clipRect = series.clipRect,
wasDirtyData = series.isDirtyData, // cache it here as it is set to false in render, but used after |
<<<<<<<
/**
* With line type charts with a single tracker, get the point closest to the mouse
*/
onmousemove: function (e) {
var mouseTracker = this,
chart = mouseTracker.chart,
series = chart.series,
point,
points,
hoverPoint = chart.hoverPoint,
hoverSeries = chart.hoverSeries,
i,
j,
distance = chart.chartWidth,
index = chart.inverted ? e.chartY : e.chartX - chart.plotLeft; // wtf?
// shared tooltip
if (chart.tooltip && mouseTracker.options.tooltip.shared && !(hoverSeries && hoverSeries.noSharedTooltip)) {
points = [];
// loop over all series and find the ones with points closest to the mouse
i = series.length;
for (j = 0; j < i; j++) {
if (series[j].visible &&
series[j].options.enableMouseTracking !== false &&
!series[j].noSharedTooltip && series[j].tooltipPoints.length) {
point = series[j].tooltipPoints[index];
point._dist = mathAbs(index - point.plotX);
distance = mathMin(distance, point._dist);
points.push(point);
=======
/**
* With line type charts with a single tracker, get the point closest to the mouse
*/
function onmousemove(e) {
var point,
points,
hoverPoint = chart.hoverPoint,
hoverSeries = chart.hoverSeries,
i,
j,
distance = chartWidth,
// the index in the tooltipPoints array, corresponding to pixel position in plot area
index = inverted ? plotHeight + plotTop - e.chartY : e.chartX - plotLeft;
// shared tooltip
if (tooltip && options.shared && !(hoverSeries && hoverSeries.noSharedTooltip)) {
points = [];
// loop over all series and find the ones with points closest to the mouse
i = series.length;
for (j = 0; j < i; j++) {
if (series[j].visible &&
series[j].options.enableMouseTracking !== false &&
!series[j].noSharedTooltip && series[j].tooltipPoints.length) {
point = series[j].tooltipPoints[index];
point._dist = mathAbs(index - point.plotX);
distance = mathMin(distance, point._dist);
points.push(point);
}
}
// remove furthest points
i = points.length;
while (i--) {
if (points[i]._dist > distance) {
points.splice(i, 1);
}
>>>>>>>
/**
* With line type charts with a single tracker, get the point closest to the mouse
*/
onmousemove: function (e) {
var mouseTracker = this,
chart = mouseTracker.chart,
series = chart.series,
point,
points,
hoverPoint = chart.hoverPoint,
hoverSeries = chart.hoverSeries,
i,
j,
distance = chart.chartWidth,
// the index in the tooltipPoints array, corresponding to pixel position in plot area
index = chart.inverted ? plotHeight + plotTop - e.chartY : e.chartX - chart.plotLeft;
// shared tooltip
if (chart.tooltip && mouseTracker.options.tooltip.shared && !(hoverSeries && hoverSeries.noSharedTooltip)) {
points = [];
// loop over all series and find the ones with points closest to the mouse
i = series.length;
for (j = 0; j < i; j++) {
if (series[j].visible &&
series[j].options.enableMouseTracking !== false &&
!series[j].noSharedTooltip && series[j].tooltipPoints.length) {
point = series[j].tooltipPoints[index];
point._dist = mathAbs(index - point.plotX);
distance = mathMin(distance, point._dist);
points.push(point); |
<<<<<<<
},
scrollbar: {
//enabled: true
height: isTouchDevice ? 20 : 14,
// trackBorderRadius: 0,
barBorderRadius: 0,
buttonBorderRadius: 0,
liveRedraw: svg && !isTouchDevice,
minWidth: 6,
/*= if (build.classic) { =*/
barBackgroundColor: '#bfc8d1',
barBorderColor: '#bfc8d1',
barBorderWidth: 1,
buttonArrowColor: '#666',
buttonBackgroundColor: '#ebe7e8',
buttonBorderColor: '#bbb',
buttonBorderWidth: 1,
rifleColor: '#666',
trackBackgroundColor: '#eeeeee',
trackBorderColor: '#eeeeee',
trackBorderWidth: 1
/*= } =*/
=======
>>>>>>>
<<<<<<<
function Scroller(chart) {
this.init(chart);
=======
function Navigator(chart) {
var chartOptions = chart.options,
navigatorOptions = chartOptions.navigator,
navigatorEnabled = navigatorOptions.enabled,
scrollbarOptions = chartOptions.scrollbar,
scrollbarEnabled = scrollbarOptions.enabled,
height = navigatorEnabled ? navigatorOptions.height : 0,
scrollbarHeight = scrollbarEnabled ? scrollbarOptions.height : 0;
this.handles = [];
this.elementsToDestroy = []; // Array containing the elements to destroy when Navigator is destroyed
this.chart = chart;
this.setBaseSeries();
this.height = height;
this.scrollbarHeight = scrollbarHeight;
this.scrollbarEnabled = scrollbarEnabled;
this.navigatorEnabled = navigatorEnabled;
this.navigatorOptions = navigatorOptions;
this.outlineHeight = height + scrollbarHeight;
// Run scroller
this.init();
>>>>>>>
function Navigator(chart) {
this.init(chart);
<<<<<<<
* Draw the scrollbar buttons with arrows
* @param {Number} index 0 is left, 1 is right
*/
drawScrollbarButton: function (index) {
var scroller = this,
chart = scroller.chart,
renderer = chart.renderer,
elementsToDestroy = scroller.elementsToDestroy,
scrollbarButtons = scroller.scrollbarButtons,
scrollbarHeight = scroller.scrollbarHeight,
scrollbarOptions = scroller.scrollbarOptions,
tempElem;
if (!scroller.rendered) {
scrollbarButtons[index] = renderer.g().add(scroller.scrollbarGroup);
// Create a rectangle for the scrollbar button
tempElem = renderer.rect()
.addClass('highcharts-scrollbar-button')
.add(scrollbarButtons[index]);
/*= if (build.classic) { =*/
// Presentational attributes
tempElem.attr({
stroke: scrollbarOptions.buttonBorderColor,
'stroke-width': scrollbarOptions.buttonBorderWidth,
fill: scrollbarOptions.buttonBackgroundColor
});
/*= } =*/
// Place the rectangle based on the rendered stroke width
tempElem.attr(tempElem.crisp({
x: -0.5,
y: -0.5,
width: scrollbarHeight + 1, // +1 to compensate for crispifying in rect method
height: scrollbarHeight + 1,
r: scrollbarOptions.buttonBorderRadius
}, tempElem.strokeWidth()));
elementsToDestroy.push(tempElem);
tempElem = renderer
.path([
'M',
scrollbarHeight / 2 + (index ? -1 : 1), scrollbarHeight / 2 - 3,
'L',
scrollbarHeight / 2 + (index ? -1 : 1), scrollbarHeight / 2 + 3,
scrollbarHeight / 2 + (index ? 2 : -2), scrollbarHeight / 2
])
.addClass('highcharts-scrollbar-arrow')
.add(scrollbarButtons[index]);
/*= if (build.classic) { =*/
tempElem.attr({
fill: scrollbarOptions.buttonArrowColor
});
/*= } =*/
elementsToDestroy.push(tempElem);
}
// adjust the right side button to the varying length of the scroll track
if (index) {
scrollbarButtons[index].attr({
translateX: scroller.scrollerWidth - scrollbarHeight
});
}
},
/**
* Render the navigator and scroll bar
=======
* Render the navigator
>>>>>>>
* Render the navigator
<<<<<<<
scrollbarOptions = scroller.scrollbarOptions,
scrollbarMinWidth = scrollbarOptions.minWidth,
maskInside = navigatorOptions.maskInside,
=======
>>>>>>>
maskInside = navigatorOptions.maskInside,
<<<<<<<
barBorderRadius = scrollbarOptions.barBorderRadius,
strokeWidth,
scrollbarStrokeWidth = scrollbarOptions.barBorderWidth,
centerBarX,
verb,
unionExtremes;
=======
outlineTop = top + halfOutline,
rendered = scroller.rendered,
verb;
>>>>>>>
outlineTop = top + halfOutline,
rendered = scroller.rendered,
verb;
<<<<<<<
if (isNaN(pxMin) || Math.abs(pxMin) === Infinity) { // Verify (#1851, #2238)
=======
if (!isNumber(pxMin) || mathAbs(pxMin) === Infinity) { // Verify (#1851, #2238)
>>>>>>>
if (!isNumber(pxMin) || Math.abs(pxMin) === Infinity) { // Verify (#1851, #2238)
<<<<<<<
verb = chart.isResizing ? 'animate' : 'attr';
outlineWidth = scroller.outline.strokeWidth();
halfOutline = outlineWidth / 2;
outlineTop = top + halfOutline;
=======
verb = rendered ? 'animate' : 'attr';
>>>>>>>
verb = rendered ? 'animate' : 'attr';
<<<<<<<
// draw the scrollbar
if (scrollbarEnabled && scrollbarGroup) {
// draw the buttons
scroller.drawScrollbarButton(0);
scroller.drawScrollbarButton(1);
scrollbarGroup[verb]({
translateX: scrollerLeft,
translateY: Math.round(outlineTop + height)
});
scrollbarTrack[verb]({
width: scrollerWidth
});
// prevent the scrollbar from drawing to small (#1246)
scrX = scrollbarHeight + zoomedMin;
scrWidth = range - scrollbarStrokeWidth;
if (scrWidth < scrollbarMinWidth) {
scrollbarPad = (scrollbarMinWidth - scrWidth) / 2;
scrWidth = scrollbarMinWidth;
scrX -= scrollbarPad;
}
scroller.scrollbarPad = scrollbarPad;
scrollbar[verb]({
x: Math.floor(scrX) + (scrollbarStrokeWidth % 2 / 2),
y: -scrollbarStrokeWidth % 2 / 2,
width: scrWidth
});
centerBarX = scrollbarHeight + zoomedMin + range / 2 - 0.5;
scroller.scrollbarRifles
.attr({
visibility: range > 12 ? 'visible' : 'hidden'
})[verb]({
d: [
'M',
centerBarX - 3, scrollbarHeight / 4,
'L',
centerBarX - 3, 2 * scrollbarHeight / 3,
'M',
centerBarX, scrollbarHeight / 4,
'L',
centerBarX, 2 * scrollbarHeight / 3,
'M',
centerBarX + 3, scrollbarHeight / 4,
'L',
centerBarX + 3, 2 * scrollbarHeight / 3
]
});
=======
if (scroller.scrollbar) {
// Keep scale 0-1
scroller.scrollbar.position(scroller.scrollerLeft, scroller.top + scroller.height, scroller.scrollerWidth, scroller.scrollbarHeight);
scroller.scrollbar.setRange(zoomedMin / navigatorWidth, zoomedMax / navigatorWidth);
>>>>>>>
if (scroller.scrollbar) {
// Keep scale 0-1
scroller.scrollbar.position(scroller.scrollerLeft, scroller.top + scroller.height, scroller.scrollerWidth, scroller.scrollbarHeight);
scroller.scrollbar.setRange(zoomedMin / navigatorWidth, zoomedMax / navigatorWidth);
<<<<<<<
if (isOnNavigator && Math.abs(chartX - zoomedMin - navigatorLeft) < handleSensitivity) {
=======
if (math.abs(chartX - zoomedMin - navigatorLeft) < handleSensitivity) {
>>>>>>>
if (Math.abs(chartX - zoomedMin - navigatorLeft) < handleSensitivity) {
<<<<<<<
} else if (isOnNavigator && Math.abs(chartX - zoomedMax - navigatorLeft) < handleSensitivity) {
=======
} else if (math.abs(chartX - zoomedMax - navigatorLeft) < handleSensitivity) {
>>>>>>>
} else if (Math.abs(chartX - zoomedMax - navigatorLeft) < handleSensitivity) {
<<<<<<<
newMin = Math.max(newMax - range, navigatorSeries.xData[0]);
=======
newMin = mathMax(newMax - range, navigatorSeries ? navigatorSeries.xData[0] : -Number.MAX_VALUE);
>>>>>>>
newMin = Math.ax(newMax - range, navigatorSeries ? navigatorSeries.xData[0] : -Number.MAX_VALUE);
<<<<<<<
scroller.render(
Math.max(baseMin, baseDataMin),
Math.min(baseMax, baseDataMax)
);
=======
/**
* Handler for updated data on the base series. When data is modified, the navigator series
* must reflect it. This is called from the Chart.redraw function before axis and series
* extremes are computed.
*/
updatedDataHandler: function () {
var scroller = this.chart.scroller,
baseSeries = scroller.baseSeries,
navigatorSeries = scroller.series;
// Detect whether the zoomed area should stick to the minimum or maximum. If the current
// axis minimum falls outside the new updated dataset, we must adjust.
scroller.stickToMin = baseSeries.xAxis.min <= baseSeries.xData[0];
// If the scrollbar is scrolled all the way to the right, keep right as new data
// comes in.
scroller.stickToMax = scroller.zoomedMax >= scroller.navigatorWidth;
// Set the navigator series data to the new data of the base series
if (navigatorSeries && !scroller.hasNavigatorData) {
navigatorSeries.options.pointStart = baseSeries.xData[0];
navigatorSeries.setData(baseSeries.options.data, false);
// When adding points, shift it. A more fail-safe and lean procedure may be to extend the three
// cases of updating data (addPoint, update, removePoint) directly so that this operation
// on the base series reflects directly on the navigator series.
if (navigatorSeries.graph && baseSeries.graph) {
navigatorSeries.graph.shift = baseSeries.graph.shift;
}
>>>>>>>
/**
* Handler for updated data on the base series. When data is modified, the navigator series
* must reflect it. This is called from the Chart.redraw function before axis and series
* extremes are computed.
*/
updatedDataHandler: function () {
var scroller = this.chart.scroller,
baseSeries = scroller.baseSeries,
navigatorSeries = scroller.series;
// Detect whether the zoomed area should stick to the minimum or maximum. If the current
// axis minimum falls outside the new updated dataset, we must adjust.
scroller.stickToMin = baseSeries.xAxis.min <= baseSeries.xData[0];
// If the scrollbar is scrolled all the way to the right, keep right as new data
// comes in.
scroller.stickToMax = scroller.zoomedMax >= scroller.navigatorWidth;
// Set the navigator series data to the new data of the base series
if (navigatorSeries && !scroller.hasNavigatorData) {
navigatorSeries.options.pointStart = baseSeries.xData[0];
navigatorSeries.setData(baseSeries.options.data, false);
// When adding points, shift it. A more fail-safe and lean procedure may be to extend the three
// cases of updating data (addPoint, update, removePoint) directly so that this operation
// on the base series reflects directly on the navigator series.
if (navigatorSeries.graph && baseSeries.graph) {
navigatorSeries.graph.shift = baseSeries.graph.shift;
}
<<<<<<<
H.Scroller = Scroller;
=======
Highcharts.Navigator = Navigator;
>>>>>>>
Highcharts.Navigator = Navigator;
<<<<<<<
this.scroller = this.navigator = new Scroller(this);
=======
this.scroller = new Navigator(this);
>>>>>>>
this.scroller = new Navigator(this);
<<<<<<<
* End Scroller code *
*****************************************************************************/
}(Highcharts));
=======
* End Navigator code *
*****************************************************************************/
>>>>>>>
* End Navigator code *
*****************************************************************************/
}(Highcharts)); |
<<<<<<<
type: 'arearange'
=======
renderTo: 'container',
type: 'arearange',
zoomType: 'x'
>>>>>>>
type: 'arearange',
zoomType: 'x' |
<<<<<<<
shader.setUniform('xAxisIsLog', axis.isLog);
=======
shader.setUniform('xAxisReversed', !!axis.reversed);
>>>>>>>
shader.setUniform('xAxisIsLog', axis.isLog);
shader.setUniform('xAxisReversed', !!axis.reversed);
<<<<<<<
shader.setUniform('yAxisIsLog', axis.isLog);
=======
shader.setUniform('yAxisReversed', !!axis.reversed);
>>>>>>>
shader.setUniform('yAxisIsLog', axis.isLog);
shader.setUniform('yAxisReversed', !!axis.reversed); |
<<<<<<<
series.createGroup(doClip);
=======
if (!series.group) {
group = series.group = renderer.g('series');
group.attr({
visibility: series.visible ? VISIBLE : HIDDEN,
zIndex: options.zIndex
})
.translate(series.xAxis.left, series.yAxis.top)
.add(chart.seriesGroup);
}
>>>>>>>
series.createGroup(doClip);
if (!series.group) {
group = series.group = renderer.g('series');
group.attr({
visibility: series.visible ? VISIBLE : HIDDEN,
zIndex: options.zIndex
})
.translate(series.xAxis.left, series.yAxis.top)
.add(chart.seriesGroup);
} |
<<<<<<<
htmlGroup = parentGroup.div = parentGroup.div || createElement('div', cls, {
position: 'absolute',
left: (parentGroup.translateX || 0) + 'px',
top: (parentGroup.translateY || 0) + 'px'
=======
htmlGroup = parentGroup.div = parentGroup.div || createElement(DIV, cls, {
position: ABSOLUTE,
left: (parentGroup.translateX || 0) + PX,
top: (parentGroup.translateY || 0) + PX,
opacity: parentGroup.opacity // #5075
>>>>>>>
htmlGroup = parentGroup.div = parentGroup.div || createElement('div', cls, {
position: 'absolute',
left: (parentGroup.translateX || 0) + 'px',
top: (parentGroup.translateY || 0) + 'px',
opacity: parentGroup.opacity // #5075 |
<<<<<<<
import { LIBRARY_MIN_WIDTH, LIBRARY_MAX_WIDTH, INSPECTOR_MIN_WIDTH, INSPECTOR_MAX_WIDTH, HEADER_HEIGHT } from '../../constants';
import DropZoneProvider from '../../components/dropzone/dropZoneProvider';
=======
import { ADMIN_TOOLBAR_HEIGHT, LIBRARY_MIN_WIDTH, LIBRARY_MAX_WIDTH, INSPECTOR_MIN_WIDTH, INSPECTOR_MAX_WIDTH, HEADER_HEIGHT } from '../../constants';
>>>>>>>
import { ADMIN_TOOLBAR_HEIGHT, LIBRARY_MIN_WIDTH, LIBRARY_MAX_WIDTH, INSPECTOR_MIN_WIDTH, INSPECTOR_MAX_WIDTH, HEADER_HEIGHT } from '../../constants';
import DropZoneProvider from '../../components/dropzone/dropZoneProvider'; |
<<<<<<<
/*global HighchartsAdapter*/
=======
/*global clearTimeout, document, Highcharts, HighchartsAdapter, setInterval, setTimeout, window */
(function (Highcharts) {
>>>>>>>
/*global clearTimeout, document, Highcharts, HighchartsAdapter, setInterval, setTimeout, window */ |
<<<<<<<
=======
// If the parameter 'old' is set, the current call will be followed
// by another call, therefore do not do any animations this time
if (!old && gridLine && gridLinePath) {
gridLine[tick.isNew ? 'attr' : 'animate']({
d: gridLinePath
});
}
>>>>>>> |
<<<<<<<
if (yBottom === 0) {
yBottom = Highcharts.pick(threshold, yAxis.min);
=======
if (yBottom === stackThreshold) {
yBottom = pick(threshold, yAxis.min);
>>>>>>>
if (yBottom === stackThreshold) {
yBottom = Highcharts.pick(threshold, yAxis.min);
<<<<<<<
pointAttr[''] = series.convertAttribs(Highcharts.extend(attr, normalOptions), seriesPointAttr['']);
=======
// Color is explicitly set to null or undefined (#1288, #4068)
if (normalOptions.hasOwnProperty('color') && !normalOptions.color) {
delete normalOptions.color;
}
pointAttr[NORMAL_STATE] = series.convertAttribs(extend(attr, normalOptions), seriesPointAttr[NORMAL_STATE]);
>>>>>>>
// Color is explicitly set to null or undefined (#1288, #4068)
if (normalOptions.hasOwnProperty('color') && !normalOptions.color) {
delete normalOptions.color;
}
pointAttr[''] = series.convertAttribs(Highcharts.extend(attr, normalOptions), seriesPointAttr['']);
<<<<<<<
// destroy all SVGElements associated to the series
Highcharts.each(['area', 'graph', 'dataLabelsGroup', 'group', 'markerGroup', 'tracker',
'graphNeg', 'areaNeg', 'posClip', 'negClip'], function (prop) {
if (series[prop]) {
=======
// Destroy all SVGElements associated to the series
for (prop in series) {
if (series[prop] instanceof SVGElement && !series[prop].survive) { // Survive provides a hook for not destroying
>>>>>>>
// Destroy all SVGElements associated to the series
for (prop in series) {
if (series[prop] instanceof Highcharts.SVGElement && !series[prop].survive) { // Survive provides a hook for not destroying
<<<<<<<
Highcharts.each(zones, function (threshold, i) {
props.push(['colorGraph' + i, threshold.color || series.color, threshold.dashStyle || options.dashStyle]);
=======
each(zones, function (threshold, i) {
props.push(['zoneGraph' + i, threshold.color || series.color, threshold.dashStyle || options.dashStyle]);
>>>>>>>
Highcharts.each(zones, function (threshold, i) {
props.push(['zoneGraph' + i, threshold.color || series.color, threshold.dashStyle || options.dashStyle]);
<<<<<<<
Highcharts.each(zones, function (threshold, i) {
translatedFrom = pick(translatedTo, (reversed ? (horiz ? chart.plotWidth : 0) : (horiz ? 0 : axis.toPixels(axis.min))));
translatedTo = Math.round(axis.toPixels(pick(threshold.value, axis.max), true));
=======
extremes = axis.getExtremes();
each(zones, function (threshold, i) {
>>>>>>>
extremes = axis.getExtremes();
Highcharts.each(zones, function (threshold, i) {
<<<<<<<
defined = Highcharts.defined,
kdComparer = this.kdComparer,
=======
>>>>>>>
defined = Highcharts.defined, |
<<<<<<<
import { useMedia3pApi } from '../../../../../app/media/media3p/api';
import { getSmallestUrlForWidth } from '../../../../../elements/media/util';
=======
import getThumbnailUrl from '../../../../../elements/media/util';
>>>>>>>
import { getSmallestUrlForWidth } from '../../../../../elements/media/util'; |
<<<<<<<
H.defaultOptions = {
/*= if (build.classic) { =*/
colors: ['#7cb5ec', '#434348', '#90ed7d', '#f7a35c',
=======
defaultOptions = {
colors: ['#7cb5ec', '#434348', '#90ed7d', '#f7a35c',
>>>>>>>
H.defaultOptions = {
/*= if (build.classic) { =*/
colors: ['#7cb5ec', '#434348', '#90ed7d', '#f7a35c',
<<<<<<<
/*= if (build.classic) { =*/
itemStyle: {
=======
itemStyle: {
>>>>>>>
/*= if (build.classic) { =*/
itemStyle: {
<<<<<<<
/*= } =*/
}
=======
}
>>>>>>>
/*= } =*/
}
<<<<<<<
// Series defaults
H.defaultPlotOptions = H.defaultOptions.plotOptions;
H.defaultSeriesOptions = H.defaultPlotOptions.line;
// set the default time methods
setTimeMethods();
=======
>>>>>>>
<<<<<<<
H.setOptions = function (options) {
=======
function setOptions(options) {
>>>>>>>
H.setOptions = function (options) {
<<<<<<<
H.defaultOptions = merge(true, H.defaultOptions, options);
=======
defaultOptions = merge(true, defaultOptions, options);
>>>>>>>
H.defaultOptions = merge(true, H.defaultOptions, options);
<<<<<<<
H.getOptions = function() {
return H.defaultOptions;
};
return H;
}(Highcharts));
=======
function getOptions() {
return defaultOptions;
}
// Series defaults
var defaultPlotOptions = defaultOptions.plotOptions,
defaultSeriesOptions = defaultPlotOptions.line;
// set the default time methods
setTimeMethods();
>>>>>>>
H.getOptions = function() {
return H.defaultOptions;
};
// Series defaults
H.defaultPlotOptions = H.defaultOptions.plotOptions;
H.defaultSeriesOptions = H.defaultPlotOptions.line;
// set the default time methods
setTimeMethods();
return H;
}(Highcharts)); |
<<<<<<<
retVal = '<b>' + (point.name || point.category) + '</b>';
=======
dateRowStart = '<span style="font-size: 0.8em">',
dateRowEnd = '</span><br/>',
retVal = '<b>' + (point.name || point.yCategory) + '</b>';
>>>>>>>
retVal = '<b>' + (point.name || point.yCategory) + '</b>'; |
<<<<<<<
QUnit.test('Ticks were drawn in break(#4485)', function (assert) {
$('#container').highcharts({
title: {
text: 'Sample of a simple break'
},
subtitle: {
text: 'Line should be interrupted between 5 and 10'
},
xAxis: {
type: 'datetime',
tickInterval: 1,
breaks: [{
from: 5,
to: 10,
breakSize: 1
}],
labels: {
format: '{value}{value}{value}'
}
},
series: [{
gapSize: 1,
data: (function () {
var data = [],
i;
for (i = 0; i < 20; i = i + 1) {
data.push(i);
}
return data;
}())
}]
});
var chart = $('#container').highcharts();
assert.strictEqual(
chart.xAxis[0].tickPositions.join(','),
'0,1,2,3,4,5,10,11,12,13,14,15,16,17,18,19',
'Skip ticks in break'
);
});
QUnit.test('alignTicks should consider only axes with series.(#4442)', function (assert) {
var chart = $('#container').highcharts({
yAxis: [{
endOnTick: false,
maxPadding: 0.0
}, {
endOnTick: false,
maxPadding: 0.0
}],
series: [{
data: [991, 455],
yAxis: 1
}]
}).highcharts();
assert.strictEqual(
chart.series[0].data[0].plotY,
0,
'Without extra padding'
);
});
=======
QUnit.test('Prevent dense ticks(#4477)', function (assert) {
$('#container').highcharts({
chart: {
type: "bar"
},
title: {
text: 'Only first and last axis label should be kept'
},
yAxis: [{
labels: {
staggerLines: 1
},
tickInterval: 1
}],
series: [{
data: [100000],
type: "column"
}]
});
var chart = $('#container').highcharts();
assert.strictEqual(
chart.yAxis[0].tickPositions.length < chart.yAxis[0].len,
true,
'Not too many tick positions'
);
});
>>>>>>>
QUnit.test('Ticks were drawn in break(#4485)', function (assert) {
$('#container').highcharts({
title: {
text: 'Sample of a simple break'
},
subtitle: {
text: 'Line should be interrupted between 5 and 10'
},
xAxis: {
type: 'datetime',
tickInterval: 1,
breaks: [{
from: 5,
to: 10,
breakSize: 1
}],
labels: {
format: '{value}{value}{value}'
}
},
series: [{
gapSize: 1,
data: (function () {
var data = [],
i;
for (i = 0; i < 20; i = i + 1) {
data.push(i);
}
return data;
}())
}]
});
var chart = $('#container').highcharts();
assert.strictEqual(
chart.xAxis[0].tickPositions.join(','),
'0,1,2,3,4,5,10,11,12,13,14,15,16,17,18,19',
'Skip ticks in break'
);
});
QUnit.test('alignTicks should consider only axes with series.(#4442)', function (assert) {
var chart = $('#container').highcharts({
yAxis: [{
endOnTick: false,
maxPadding: 0.0
}, {
endOnTick: false,
maxPadding: 0.0
}],
series: [{
data: [991, 455],
yAxis: 1
}]
}).highcharts();
assert.strictEqual(
chart.series[0].data[0].plotY,
0,
'Without extra padding'
);
});
QUnit.test('Prevent dense ticks(#4477)', function (assert) {
$('#container').highcharts({
chart: {
type: "bar"
},
title: {
text: 'Only first and last axis label should be kept'
},
yAxis: [{
labels: {
staggerLines: 1
},
tickInterval: 1
}],
series: [{
data: [100000],
type: "column"
}]
});
var chart = $('#container').highcharts();
assert.strictEqual(
chart.yAxis[0].tickPositions.length < chart.yAxis[0].len,
true,
'Not too many tick positions'
);
}); |
<<<<<<<
QUnit.test('Show last label hiding interrupted by animation (#5332)', function (assert) {
var done = assert.async();
var chart = Highcharts.chart('container', {
chart: {
animation: {
duration: 1
},
width: 300,
height: 300
},
series: [{
data: [25, 125]
}],
yAxis: {
showLastLabel: false
}
});
assert.ok(
chart.yAxis[0].ticks[50].label.attr('y') > 0,
'50 label is placed'
);
chart.xAxis[0].update({
minTickInterval: 1
});
chart.series[0].setData([14, 40]);
setTimeout(function () {
assert.ok(
chart.yAxis[0].ticks[50].label.attr('y') < 0,
'50 label is hidden'
);
done();
}, 50);
});
=======
QUnit.test('Check that tick labels do not move (#4929)', function (assert) {
var chart = Highcharts.chart('container', {
chart: {
polar: true,
animation: false
},
xAxis: {
tickmarkPlacement: 'on',
categories: ['Category Alpha', 'Category Beta', 'Category Gamma', 'Category Delta']
},
yAxis: {
labels: {
enabled: false
}
},
series: [{
animation: false,
pointPlacement: 'on',
data: [150, 100, 125, 150]
}]
});
assert.strictEqual(
chart.xAxis[0].ticks[1].label.attr('text-anchor'),
'start',
'Initially left aligned'
);
chart.series[0].data[0].update({
y: 155
});
assert.strictEqual(
chart.xAxis[0].ticks[1].label.attr('text-anchor'),
'start',
'Dynamically left aligned'
);
});
>>>>>>>
QUnit.test('Show last label hiding interrupted by animation (#5332)', function (assert) {
var done = assert.async();
var chart = Highcharts.chart('container', {
chart: {
animation: {
duration: 1
},
width: 300,
height: 300
},
series: [{
data: [25, 125]
}],
yAxis: {
showLastLabel: false
}
});
assert.ok(
chart.yAxis[0].ticks[50].label.attr('y') > 0,
'50 label is placed'
);
chart.xAxis[0].update({
minTickInterval: 1
});
chart.series[0].setData([14, 40]);
setTimeout(function () {
assert.ok(
chart.yAxis[0].ticks[50].label.attr('y') < 0,
'50 label is hidden'
);
done();
}, 50);
});
QUnit.test('Check that tick labels do not move (#4929)', function (assert) {
var chart = Highcharts.chart('container', {
chart: {
polar: true,
animation: false
},
xAxis: {
tickmarkPlacement: 'on',
categories: ['Category Alpha', 'Category Beta', 'Category Gamma', 'Category Delta']
},
yAxis: {
labels: {
enabled: false
}
},
series: [{
animation: false,
pointPlacement: 'on',
data: [150, 100, 125, 150]
}]
});
assert.strictEqual(
chart.xAxis[0].ticks[1].label.attr('text-anchor'),
'start',
'Initially left aligned'
);
chart.series[0].data[0].update({
y: 155
});
assert.strictEqual(
chart.xAxis[0].ticks[1].label.attr('text-anchor'),
'start',
'Dynamically left aligned'
);
}); |
<<<<<<<
var ALIGN_FACTOR,
ALLOWED_SHAPES,
Chart = Highcharts.Chart,
defined = Highcharts.defined,
extend = Highcharts.extend,
isArray = Highcharts.isArray,
isNumber = Highcharts.isNumber,
each = Highcharts.each;
ALLOWED_SHAPES = ["path", "rect", "circle"];
ALIGN_FACTOR = {
top: 0,
left: 0,
center: 0.5,
middle: 0.5,
bottom: 1,
right: 1
};
// Highcharts helper methods
var inArray = HighchartsAdapter.inArray,
merge = Highcharts.merge;
function defaultOptions(shapeType) {
var shapeOptions,
options;
options = {
xAxis: 0,
yAxis: 0,
title: {
style: {},
text: "",
x: 0,
y: 0
},
shape: {
params: {
stroke: "#000000",
fill: "transparent",
strokeWidth: 2
}
}
=======
var UNDEFINED,
ALIGN_FACTOR,
ALLOWED_SHAPES,
Chart = Highcharts.Chart,
extend = Highcharts.extend,
each = Highcharts.each;
ALLOWED_SHAPES = ['path', 'rect', 'circle'];
ALIGN_FACTOR = {
top: 0,
left: 0,
center: 0.5,
middle: 0.5,
bottom: 1,
right: 1
>>>>>>>
var UNDEFINED,
ALIGN_FACTOR,
ALLOWED_SHAPES,
Chart = Highcharts.Chart,
extend = Highcharts.extend,
each = Highcharts.each;
ALLOWED_SHAPES = ['path', 'rect', 'circle'];
ALIGN_FACTOR = {
top: 0,
left: 0,
center: 0.5,
middle: 0.5,
bottom: 1,
right: 1
<<<<<<<
function translatePath(d, xAxis, yAxis, xOffset, yOffset) {
var len = d.length,
i = 0;
=======
return options;
}
function isArray(obj) {
return Object.prototype.toString.call(obj) === '[object Array]';
}
function isNumber(n) {
return typeof n === 'number';
}
function defined(obj) {
return obj !== UNDEFINED && obj !== null;
}
>>>>>>>
return options;
} |
<<<<<<<
QUnit.test('Gantt using the keys feature #13768', function (assert) {
var chart = Highcharts.ganttChart('container', {
series: [{
keys: ['start', 'end'],
data: [
[Date.UTC(2014, 10, 20), Date.UTC(2014, 10, 25)]
]
}]
});
assert.strictEqual(
chart.series[0].processedXData[0] !== undefined,
true,
'The processedXData should be applied by using the keys feature #13768'
);
assert.strictEqual(
chart.series[0].processedYData[0] !== undefined,
true,
'The processedYData should be applied by using the keys feature #13768'
);
});
=======
QUnit.test('When navigator enabled there should be no errors in the console caused by unsorted data, (#13376).', function (assert) {
const chart = Highcharts.ganttChart('container', {
navigator: {
enabled: true
},
series: [{
data: [{
name: 'Task 1',
start: 2,
end: 3
}, {
name: 'Task 2',
start: 3,
end: 4
}, {
name: 'Task 3',
start: 1,
end: 2
}]
}]
});
assert.notOk(chart.series[1].requireSorting, "No error 15 in the console.");
});
>>>>>>>
QUnit.test('When navigator enabled there should be no errors in the console caused by unsorted data, (#13376).', function (assert) {
const chart = Highcharts.ganttChart('container', {
navigator: {
enabled: true
},
series: [{
data: [{
name: 'Task 1',
start: 2,
end: 3
}, {
name: 'Task 2',
start: 3,
end: 4
}, {
name: 'Task 3',
start: 1,
end: 2
}]
}]
});
assert.notOk(chart.series[1].requireSorting, "No error 15 in the console.");
});
QUnit.test('Gantt using the keys feature #13768', function (assert) {
var chart = Highcharts.ganttChart('container', {
series: [{
keys: ['start', 'end'],
data: [
[Date.UTC(2014, 10, 20), Date.UTC(2014, 10, 25)]
]
}]
});
assert.strictEqual(
chart.series[0].processedXData[0] !== undefined,
true,
'The processedXData should be applied by using the keys feature #13768'
);
assert.strictEqual(
chart.series[0].processedYData[0] !== undefined,
true,
'The processedYData should be applied by using the keys feature #13768'
);
}); |
<<<<<<<
createElement(nodeName) :
document.createElementNS(wrapper.SVG_NS, nodeName);
=======
createElement(nodeName) :
doc.createElementNS(SVG_NS, nodeName);
>>>>>>>
createElement(nodeName) :
document.createElementNS(wrapper.SVG_NS, nodeName);
<<<<<<<
// this again with new IE release. In exports, the rendering is passed to PhantomJS.
supports = this.renderer.forExport || (elem.style.textShadow !== undefined && !isMS);
=======
// this again with new IE release. In exports, the rendering is passed to PhantomJS.
supports = forExport || (elem.style.textShadow !== UNDEFINED && !isMS);
>>>>>>>
// this again with new IE release. In exports, the rendering is passed to PhantomJS.
supports = this.renderer.forExport || (elem.style.textShadow !== undefined && !isMS);
<<<<<<<
Math.max(value - (shadows[i].cutHeight || 0), 0) :
key === 'd' ? this.d : value
=======
Math.max(value - (shadows[i].cutHeight || 0), 0) :
key === 'd' ? this.d : value
>>>>>>>
Math.max(value - (shadows[i].cutHeight || 0), 0) :
key === 'd' ? this.d : value
<<<<<<<
element.onclick = function (e) {
if (navigator.userAgent.indexOf('Android') === -1 || Date.now() - (svgElement.touchEventFired || 0) > 1100) { // #2269
=======
element.onclick = function (e) {
if (userAgent.indexOf('Android') === -1 || Date.now() - (svgElement.touchEventFired || 0) > 1100) { // #2269
>>>>>>>
element.onclick = function (e) {
if (navigator.userAgent.indexOf('Android') === -1 || Date.now() - (svgElement.touchEventFired || 0) > 1100) { // #2269
<<<<<<<
/*= if (build.classic) { =*/
// WebKit and Batik have problems with a stroke-width of zero, so in this case we remove the
=======
// WebKit and Batik have problems with a stroke-width of zero, so in this case we remove the
>>>>>>>
/*= if (build.classic) { =*/
// WebKit and Batik have problems with a stroke-width of zero, so in this case we remove the
<<<<<<<
renderer.url = (isFirefox || isWebKit) && document.getElementsByTagName('base').length ?
loc.href
.replace(/#.*?$/, '') // remove the hash
.replace(/([\('\)])/g, '\\$1') // escape parantheses and quotes
.replace(/ /g, '%20') : // replace spaces (needed for Safari only)
'';
=======
renderer.url = (isFirefox || isWebKit) && doc.getElementsByTagName('base').length ?
loc.href
.replace(/#.*?$/, '') // remove the hash
.replace(/([\('\)])/g, '\\$1') // escape parantheses and quotes
.replace(/ /g, '%20') : // replace spaces (needed for Safari only)
'';
>>>>>>>
renderer.url = (isFirefox || isWebKit) && document.getElementsByTagName('base').length ?
loc.href
.replace(/#.*?$/, '') // remove the hash
.replace(/([\('\)])/g, '\\$1') // escape parantheses and quotes
.replace(/ /g, '%20') : // replace spaces (needed for Safari only)
'';
<<<<<<<
return (this.style = extend({
=======
this.style = extend({
>>>>>>>
this.style = extend({
<<<<<<<
}, style));
=======
}, style);
return this.style;
>>>>>>>
}, style);
return this.style;
<<<<<<<
var fontSizeStyle;
/*= if (build.classic) { =*/
fontSizeStyle = /(px|em)$/.test(tspan && tspan.style.fontSize) ?
tspan.style.fontSize :
((textStyles && textStyles.fontSize) || renderer.style.fontSize || 12);
/*= } =*/
return textLineHeight ?
pInt(textLineHeight) :
renderer.fontMetrics(
fontSizeStyle,
tspan
).h;
=======
return textLineHeight ?
pInt(textLineHeight) :
renderer.fontMetrics(
/(px|em)$/.test(tspan && tspan.style.fontSize) ?
tspan.style.fontSize :
((textStyles && textStyles.fontSize) || renderer.style.fontSize || 12),
tspan
).h;
>>>>>>>
var fontSizeStyle;
/*= if (build.classic) { =*/
fontSizeStyle = /(px|em)$/.test(tspan && tspan.style.fontSize) ?
tspan.style.fontSize :
((textStyles && textStyles.fontSize) || renderer.style.fontSize || 12);
/*= } =*/
return textLineHeight ?
pInt(textLineHeight) :
renderer.fontMetrics(
fontSizeStyle,
tspan
).h;
<<<<<<<
textNode.appendChild(document.createTextNode(unescapeAngleBrackets(textStr)));
return;
=======
textNode.appendChild(doc.createTextNode(unescapeAngleBrackets(textStr)));
>>>>>>>
textNode.appendChild(document.createTextNode(unescapeAngleBrackets(textStr)));
<<<<<<<
tspan = document.createElementNS(renderer.SVG_NS, 'tspan');
=======
tspan = doc.createElementNS(SVG_NS, 'tspan');
>>>>>>>
tspan = document.createElementNS(renderer.SVG_NS, 'tspan');
<<<<<<<
if (obj.element) { // Meaning not destroyed
=======
// Special case for SVGs on IE11, the width is not accessible until the image is
// part of the DOM (#2854).
if (this.width === 0) {
css(this, {
position: ABSOLUTE,
top: '-999em'
});
document.body.appendChild(this);
}
>>>>>>>
if (obj.element) { // Meaning not destroyed
<<<<<<<
// Create the border box if it is not already present
=======
>>>>>>>
// Create the border box if it is not already present
<<<<<<<
=======
// create the border box if it is not already present
boxX = crispAdjust;
boxY = (baseline ? -baselineOffset : 0) + crispAdjust;
>>>>>>>
<<<<<<<
renderer.symbol(shape) :
renderer.rect();
if (className) {
box.addClass('highcharts-' + className + '-box');
=======
renderer.symbol(shape, boxX, boxY, wrapper.width, wrapper.height, deferredAttr) :
renderer.rect(boxX, boxY, wrapper.width, wrapper.height, 0, deferredAttr[STROKE_WIDTH]);
if (!box.isImg) { // #4324, fill "none" causes it to be ignored by mouse events in IE
box.attr('fill', NONE);
>>>>>>>
renderer.symbol(shape) :
renderer.rect();
if (className) {
box.addClass('highcharts-' + className + '-box'); |
<<<<<<<
=======
//showFull: true,
margin: 10,
minWidth: 6,
>>>>>>>
<<<<<<<
=======
zIndex: 3,
step: 0.2,
//size: null,
>>>>>>>
<<<<<<<
function Scrollbar(renderer, options, chart) { // docs
this.init(renderer, options, chart);
}
=======
function Scrollbar(renderer, options, chart) {
this.scrollbarButtons = [];
>>>>>>>
function Scrollbar(renderer, options, chart) { // docs
this.init(renderer, options, chart);
}
<<<<<<<
// Store current position:
scroller.from = from;
scroller.to = to;
=======
// Store current position:
scroller.from = from;
scroller.to = to;
if (!vertical) {
scroller.scrollbarGroup[method]({
translateX: newPos
});
scroller.scrollbar[method]({
width: newSize
});
scroller.scrollbarRifles[method]({
translateX: newRiflesPos
});
scroller.scrollbarLeft = newPos;
scroller.scrollbarTop = 0;
} else {
scroller.scrollbarGroup[method]({
translateY: newPos
});
scroller.scrollbar[method]({
height: newSize
});
scroller.scrollbarRifles[method]({
translateY: newRiflesPos
});
scroller.scrollbarTop = newPos;
scroller.scrollbarLeft = 0;
}
>>>>>>>
// Store current position:
scroller.from = from;
scroller.to = to; |
<<<<<<<
=======
globalAnimation = renderer.globalAnimation;
>>>>>>>
/*= if (build.classic) { =*/
globalAnimation = renderer.globalAnimation;
<<<<<<<
HighchartsAdapter.fireEvent(this, eventType, eventArgs, defaultFunction);
}
};
return H;
}(Highcharts));
(function (H) {
var addEvent = H.addEvent,
arrayMax = H.arrayMax,
arrayMin = H.arrayMin,
Color = H.Color, // @todo add as a requirement
Date = H.Date,
defaultOptions = H.defaultOptions,
defaultPlotOptions = H.defaultPlotOptions,
defined = H.defined,
each = H.each,
erase = H.erase,
error = H.error,
extend = H.extend,
isArray = H.isArray,
isNumber = H.isNumber,
isObject = H.isObject,
isString = H.isString,
LegendSymbolMixin = H.LegendSymbolMixin, // @todo add as a requirement
merge = H.merge,
pick = H.pick,
Point = H.Point, // @todo add as a requirement
removeEvent = H.removeEvent,
splat = H.splat,
stableSort = H.stableSort,
SVGElement = H.SVGElement,
useCanVG = H.useCanVG;
/**
=======
fireEvent(this, eventType, eventArgs, defaultFunction);
},
visible: true
};/**
>>>>>>>
fireEvent(this, eventType, eventArgs, defaultFunction);
},
visible: true
};
return H;
}(Highcharts));(function (H) {
var addEvent = H.addEvent,
arrayMax = H.arrayMax,
arrayMin = H.arrayMin,
Color = H.Color, // @todo add as a requirement
Date = H.Date,
defaultOptions = H.defaultOptions,
defaultPlotOptions = H.defaultPlotOptions,
defined = H.defined,
each = H.each,
erase = H.erase,
error = H.error,
extend = H.extend,
isArray = H.isArray,
isNumber = H.isNumber,
isObject = H.isObject,
isString = H.isString,
LegendSymbolMixin = H.LegendSymbolMixin, // @todo add as a requirement
merge = H.merge,
pick = H.pick,
Point = H.Point, // @todo add as a requirement
removeEvent = H.removeEvent,
splat = H.splat,
stableSort = H.stableSort,
SVGElement = H.SVGElement,
useCanVG = H.useCanVG;
/**
<<<<<<<
return H;
}(Highcharts));
(function (H) {
var addEvent = H.addEvent,
animate = H.animate,
Axis = H.Axis,
Chart = H.Chart,
createElement = H.createElement,
css = H.css,
each = H.each,
erase = H.erase,
extend = H.extend,
fireEvent = H.fireEvent,
inArray = H.inArray,
isArray = H.isArray,
isObject = H.isObject,
merge = H.merge,
pick = H.pick,
Point = H.Point,
Series = H.Series,
seriesTypes = H.seriesTypes,
setAnimation = H.setAnimation,
splat = H.splat;
=======
/**
* Get stack indicator, according to it's x-value, to determine points with the same x-value
*/
Series.prototype.getStackIndicator = function(stackIndicator, x, index) {
if (!defined(stackIndicator) || stackIndicator.x !== x) {
stackIndicator = {
x: x,
index: 0
};
} else {
stackIndicator.index++;
}
stackIndicator.key = [index, x, stackIndicator.index].join(',');
return stackIndicator;
};
>>>>>>>
/**
* Get stack indicator, according to it's x-value, to determine points with the same x-value
*/
Series.prototype.getStackIndicator = function(stackIndicator, x, index) {
if (!defined(stackIndicator) || stackIndicator.x !== x) {
stackIndicator = {
x: x,
index: 0
};
} else {
stackIndicator.index++;
}
stackIndicator.key = [index, x, stackIndicator.index].join(',');
return stackIndicator;
};
return H;
}(Highcharts));
(function (H) {
var addEvent = H.addEvent,
animate = H.animate,
Axis = H.Axis,
Chart = H.Chart,
createElement = H.createElement,
css = H.css,
each = H.each,
erase = H.erase,
extend = H.extend,
fireEvent = H.fireEvent,
inArray = H.inArray,
isArray = H.isArray,
isObject = H.isObject,
merge = H.merge,
pick = H.pick,
Point = H.Point,
Series = H.Series,
seriesTypes = H.seriesTypes,
setAnimation = H.setAnimation,
splat = H.splat;
<<<<<<<
seriesBarW = series.barW = Math.max(pointWidth, 1 + 2 * borderWidth), // postprocessed for border width
pointXOffset = series.pointXOffset = metrics.offset,
xCrisp = -(borderWidth % 2 ? 0.5 : 0),
yCrisp = borderWidth % 2 ? 0.5 : 1;
=======
seriesBarW = series.barW = mathMax(pointWidth, 1 + 2 * borderWidth), // postprocessed for border width
pointXOffset = series.pointXOffset = metrics.offset;
>>>>>>>
seriesBarW = series.barW = Math.max(pointWidth, 1 + 2 * borderWidth), // postprocessed for border width
pointXOffset = series.pointXOffset = metrics.offset;
<<<<<<<
var yBottom = pick(point.yBottom, translatedThreshold),
safeDistance = 999 + Math.abs(yBottom),
plotY = Math.min(Math.max(-safeDistance, point.plotY), yAxis.len + safeDistance), // Don't draw too far outside plot area (#1303, #2241, #4264)
=======
var yBottom = mathMin(pick(point.yBottom, translatedThreshold), 9e4), // #3575
safeDistance = 999 + mathAbs(yBottom),
plotY = mathMin(mathMax(-safeDistance, point.plotY), yAxis.len + safeDistance), // Don't draw too far outside plot area (#1303, #2241, #4264)
>>>>>>>
var yBottom = pick(point.yBottom, translatedThreshold),
safeDistance = 999 + Math.abs(yBottom),
plotY = Math.min(Math.max(-safeDistance, point.plotY), yAxis.len + safeDistance), // Don't draw too far outside plot area (#1303, #2241, #4264)
<<<<<<<
barY = Math.min(plotY, yBottom),
right,
bottom,
fromTop,
=======
barY = mathMin(plotY, yBottom),
>>>>>>>
barY = Math.min(plotY, yBottom),
<<<<<<<
barY =
Math.round(Math.abs(barY - translatedThreshold) > minPointLength ? // stacked
=======
barY = mathAbs(barY - translatedThreshold) > minPointLength ? // stacked
>>>>>>>
barY = Math.abs(barY - translatedThreshold) > minPointLength ? // stacked
<<<<<<<
// Round off to obtain crisp edges and avoid overlapping with neighbours (#2694)
right = Math.round(barX + barW) + xCrisp;
barX = Math.round(barX) + xCrisp;
barW = right - barX;
fromTop = Math.abs(barY) <= 0.5; // #4504
bottom = Math.min(Math.round(barY + barH) + yCrisp, 9e4); // #3575
barY = Math.round(barY) + yCrisp;
barH = bottom - barY;
// Top edges are exceptions
if (fromTop) {
barY -= 1;
barH += 1;
}
=======
>>>>>>> |
<<<<<<<
handles[index][scroller.rendered ? 'animate' : 'attr']({
translateX: scroller.scrollerLeft + scroller.scrollbar.size + parseInt(x, 10),
=======
handles[index][scroller.rendered && !scroller.hasDragged ? 'animate' : 'attr']({
translateX: scroller.scrollerLeft + scroller.scrollbarHeight + parseInt(x, 10),
>>>>>>>
handles[index][scroller.rendered && !scroller.hasDragged ? 'animate' : 'attr']({
translateX: scroller.scrollerLeft + scroller.scrollbarHeight + parseInt(x, 10),
<<<<<<<
zoomedMax = Math.round(scroller.zoomedMax);
zoomedMin = Math.round(scroller.zoomedMin);
=======
zoomedMax = mathRound(scroller.zoomedMax);
zoomedMin = mathRound(scroller.zoomedMin);
>>>>>>>
zoomedMax = Math.round(scroller.zoomedMax);
zoomedMin = Math.round(scroller.zoomedMin);
<<<<<<<
verb = rendered ? 'animate' : 'attr';
outlineWidth = scroller.outline.strokeWidth();
halfOutline = outlineWidth / 2;
outlineTop = top + halfOutline;
=======
verb = rendered && !scroller.hasDragged ? 'animate' : 'attr';
>>>>>>>
verb = rendered && !scroller.hasDragged ? 'animate' : 'attr';
<<<<<<<
xAxis;
if (scroller && scroller.baseSeries) {
xAxis = scroller.baseSeries[0].xAxis;
if (xAxis) {
scroller.render(xAxis.min, xAxis.max);
}
=======
xAxis = scroller && scroller.baseSeries && scroller.baseSeries.xAxis;
if (xAxis) {
scroller.render(xAxis.min, xAxis.max);
>>>>>>>
xAxis = scroller && scroller.baseSeries && scroller.baseSeries.xAxis;
if (xAxis) {
scroller.render(xAxis.min, xAxis.max);
<<<<<<<
this._events = undefined;
if (this.navigatorEnabled && this.baseSeries) {
=======
this._events = UNDEFINED;
this.removeBaseSeriesEvents();
},
removeBaseSeriesEvents: function () {
if (this.navigatorEnabled && this.baseSeries && this.baseSeries.xAxis && this.navigatorOptions.adaptToUpdatedData !== false) {
>>>>>>>
this._events = undefined;
this.removeBaseSeriesEvents();
},
removeBaseSeriesEvents: function () {
if (this.navigatorEnabled && this.baseSeries && this.baseSeries.xAxis && this.navigatorOptions.adaptToUpdatedData !== false) {
<<<<<<<
// Survive Series.update()
each(baseSeries, function (series) {
series.userOptions.events = extend(series.userOptions.event, { updatedData: this.updatedDataHandler });
});
=======
>>>>>>>
<<<<<<<
each(this.series, function (series) {
series.remove();
});
=======
this.removeBaseSeriesEvents();
this.series.remove();
>>>>>>>
this.removeBaseSeriesEvents();
this.series.remove();
<<<<<<<
// Merge data separately. Do a slice to avoid mutating the navigator options from base series (#4923).
var navigatorSeriesData = baseNavigatorOptions.data || chartNavigatorOptions.data;
navigator.hasNavigatorData = navigator.hasNavigatorData || !!navigatorSeriesData;
mergedNavSeriesOptions.data = navigatorSeriesData || baseOptions.data && baseOptions.data.slice(0);
// Add the series
navigatorSeries.push(chart.initSeries(mergedNavSeriesOptions));
});
} else {
// No base series, build from mixin and chart wide options
mergedNavSeriesOptions = merge(chartNavigatorOptions, navSeriesMixin);
mergedNavSeriesOptions.data = chartNavigatorOptions.data;
navigator.hasNavigatorData = !!mergedNavSeriesOptions.data;
navigatorSeries.push(chart.initSeries(mergedNavSeriesOptions));
}
=======
this.addBaseSeriesEvents();
>>>>>>>
// Merge data separately. Do a slice to avoid mutating the navigator options from base series (#4923).
var navigatorSeriesData = baseNavigatorOptions.data || chartNavigatorOptions.data;
navigator.hasNavigatorData = navigator.hasNavigatorData || !!navigatorSeriesData;
mergedNavSeriesOptions.data = navigatorSeriesData || baseOptions.data && baseOptions.data.slice(0);
// Add the series
navigatorSeries.push(chart.initSeries(mergedNavSeriesOptions));
});
} else {
// No base series, build from mixin and chart wide options
mergedNavSeriesOptions = merge(chartNavigatorOptions, navSeriesMixin);
mergedNavSeriesOptions.data = chartNavigatorOptions.data;
navigator.hasNavigatorData = !!mergedNavSeriesOptions.data;
navigatorSeries.push(chart.initSeries(mergedNavSeriesOptions));
}
this.addBaseSeriesEvents();
<<<<<<<
var baseSeries = this.baseSeries,
baseXAxis = baseSeries[0].xAxis,
=======
if (!this.chart.scroller.baseSeries || !this.chart.scroller.baseSeries.xAxis) {
return;
}
var baseXAxis = this,
scroller = baseXAxis.chart.scroller,
>>>>>>>
if (!this.chart.scroller.baseSeries || !this.chart.scroller.baseSeries.xAxis) {
return;
}
var baseXAxis = this,
scroller = baseXAxis.chart.scroller,
<<<<<<<
// If the zoomed range is already at the max, move it to the right as new data
// comes in
if (stickToMax) {
newMax = baseDataMax;
if (!stickToMin) { // if stickToMin is true, the new min value is set above
newMin = Math.ax(newMax - range, navigatorSeries ? navigatorSeries.xData[0] : -Number.MAX_VALUE);
=======
if (!unmutable) {
// If the zoomed range is already at the min, move it to the right as new data
// comes in
if (stickToMin) {
newMin = baseDataMin;
newMax = newMin + range;
>>>>>>>
if (!unmutable) {
// If the zoomed range is already at the min, move it to the right as new data
// comes in
if (stickToMin) {
newMin = baseDataMin;
newMax = newMin + range;
<<<<<<<
scroller.stickToMin = baseSeries.xAxis.min <= baseSeries.xData[0];
// If the scrollbar is scrolled all the way to the right, keep right as new data
=======
scroller.stickToMin = isNumber(baseSeries.xAxis.min) && (baseSeries.xAxis.min <= baseSeries.xData[0]);
// If the scrollbar is scrolled all the way to the right, keep right as new data
>>>>>>>
scroller.stickToMin = isNumber(baseSeries.xAxis.min) && (baseSeries.xAxis.min <= baseSeries.xData[0]);
// If the scrollbar is scrolled all the way to the right, keep right as new data |
<<<<<<<
PanelTypes.MEDIA_STYLE,
=======
PanelTypes.BACKGROUND_DISPLAY,
>>>>>>>
PanelTypes.BACKGROUND_DISPLAY,
PanelTypes.MEDIA_STYLE, |
<<<<<<<
=======
/*= if (build.classic) { =*/
>>>>>>>
<<<<<<<
=======
/*= } =*/
>>>>>>>
<<<<<<<
/**
* Postprocess mapping between options and SVG attributes
*/
=======
/*= if (build.classic) { =*/
// Postprocess mapping between options and SVG attributes
>>>>>>>
// Postprocess mapping between options and SVG attributes
<<<<<<<
=======
/*= } =*/
>>>>>>> |
<<<<<<<
setState: function (state, move) {
H.Point.prototype.setState.call(this, state, move);
if (state === 'hover') {
if (this.dataLabel) {
this.dataLabel.attr({ zIndex: 1002 });
}
} else {
if (this.dataLabel) {
this.dataLabel.attr({ zIndex: this.node.zIndex + 1 });
}
}
},
=======
>>>>>>>
<<<<<<<
'fill': point.color || this.color,
'zIndex': point.node.zIndex
=======
'fill': point.color || this.color
>>>>>>>
'fill': point.color || this.color
<<<<<<<
if (state === 'hover') {
delete attr.fill;
} else {
attr.fill = 'none';
attr.zIndex = 0;
}
}
=======
// Hide levels above the current view
attr.fill = 'none';
attr["stroke-width"] = 0;
} else if (!point.node.isLeaf) {
// If not a leaf, then remove fill
// @todo let users set the opacity
attr.fill = pick(options.interactByLeaf, !options.allowDrillToNode) ? 'none' : Color(attr.fill).setOpacity(state === 'hover' ? 0.75 : 0.15).get();
} else if (state) {
// Brighten and hoist the hover nodes
attr.fill = Color(attr.fill).brighten(stateOptions.brightness).get();
}
>>>>>>>
// Hide levels above the current view
attr.fill = 'none';
attr["stroke-width"] = 0;
} else if (!point.node.isLeaf) {
// If not a leaf, then remove fill
// @todo let users set the opacity
attr.fill = pick(options.interactByLeaf, !options.allowDrillToNode) ? 'none' : Color(attr.fill).setOpacity(state === 'hover' ? 0.75 : 0.15).get();
} else if (state) {
// Brighten and hoist the hover nodes
attr.fill = Color(attr.fill).brighten(stateOptions.brightness).get();
}
<<<<<<<
=======
each(points, function (point) {
var groupKey = "levelGroup-" + point.node.levelDynamic;
if (!series[groupKey]) {
series[groupKey] = series.chart.renderer.g(groupKey)
.attr({
zIndex: 1000 - point.node.levelDynamic // @todo Set the zIndex based upon the number of levels, instead of using 1000
})
.add(series.group);
}
point.group = series[groupKey];
// Preliminary code in prepraration for HC5 that uses pointAttribs for all series
point.pointAttr = {
'': series.pointAttribs(point),
'hover': series.pointAttribs(point, 'hover'),
'select': {}
};
});
>>>>>>>
each(points, function (point) {
var groupKey = "levelGroup-" + point.node.levelDynamic;
if (!series[groupKey]) {
series[groupKey] = series.chart.renderer.g(groupKey)
.attr({
zIndex: 1000 - point.node.levelDynamic // @todo Set the zIndex based upon the number of levels, instead of using 1000
})
.add(series.group);
}
point.group = series[groupKey];
});
<<<<<<<
each(points, function (point) {
var cursor,
drillId;
if (point.graphic) {
// If drillToNode is allowed, set a point cursor on clickables & add drillId to point
if (series.options.allowDrillToNode) {
=======
// If drillToNode is allowed, set a point cursor on clickables & add drillId to point
if (series.options.allowDrillToNode) {
each(points, function (point) {
var cursor,
drillId;
if (point.graphic) {
>>>>>>>
// If drillToNode is allowed, set a point cursor on clickables & add drillId to point
if (series.options.allowDrillToNode) {
each(points, function (point) {
var cursor,
drillId;
if (point.graphic) { |
<<<<<<<
=======
>>>>>>>
<<<<<<<
=======
tpl = tpl.replace(/___doublequote___/g, '"');
tpl = tpl.replace(/___rep3___/g, '/[ ,]/');
tpl = tpl.replace(/___rep4___/g, '/[ ,]+/');
>>>>>>>
tpl = tpl.replace(/___doublequote___/g, '"');
tpl = tpl.replace(/___rep3___/g, '/[ ,]/');
tpl = tpl.replace(/___rep4___/g, '/[ ,]+/'); |
<<<<<<<
var nodeLookup = {},
chart = this.chart;
H.Series.prototype.generatePoints.call(this);
if (!this.nodes) {
this.nodes = []; // List of Point-like node items
}
this.colorCounter = 0;
// Reset links from previous run
this.nodes.forEach(function (node) {
node.linksFrom.length = 0;
node.linksTo.length = 0;
});
// Create the node list and set up links
this.points.forEach(function (point) {
if (defined(point.from)) {
if (!nodeLookup[point.from]) {
nodeLookup[point.from] = this.createNode(point.from);
}
nodeLookup[point.from].linksFrom.push(point);
point.fromNode = nodeLookup[point.from];
// Point color defaults to the fromNode's color
if (chart.styledMode) {
point.colorIndex = pick(
point.options.colorIndex,
nodeLookup[point.from].colorIndex
);
} else {
point.color =
point.options.color || nodeLookup[point.from].color;
}
}
if (defined(point.to)) {
if (!nodeLookup[point.to]) {
nodeLookup[point.to] = this.createNode(point.to);
}
nodeLookup[point.to].linksTo.push(point);
point.toNode = nodeLookup[point.to];
}
point.formatPrefix = 'link';
point.name = point.name || point.id; // for use in formats
}, this);
=======
H.NodesMixin.generatePoints.apply(this, arguments);
>>>>>>>
H.NodesMixin.generatePoints.apply(this, arguments);
<<<<<<<
// Networkgraph has two separate collecions of nodes and lins, render
// dataLabels for both sets:
drawDataLabels: function () {
var textPath = this.options.dataLabels.textPath;
// Render node labels:
Series.prototype.drawDataLabels.apply(this, arguments);
// Render link labels:
this.points = this.data;
this.options.dataLabels.textPath = this.options.dataLabels.linkTextPath;
Series.prototype.drawDataLabels.apply(this, arguments);
// Restore nodes
this.points = this.nodes;
this.options.dataLabels.textPath = textPath;
},
/*
* Draggable mode:
=======
// Draggable mode:
/**
* Redraw halo on mousemove during the drag&drop action.
*
* @param {Highcharts.Point} point The point that should show halo.
>>>>>>>
// Networkgraph has two separate collecions of nodes and lines, render
// dataLabels for both sets:
drawDataLabels: function () {
var textPath = this.options.dataLabels.textPath;
// Render node labels:
Series.prototype.drawDataLabels.apply(this, arguments);
// Render link labels:
this.points = this.data;
this.options.dataLabels.textPath = this.options.dataLabels.linkTextPath;
Series.prototype.drawDataLabels.apply(this, arguments);
// Restore nodes
this.points = this.nodes;
this.options.dataLabels.textPath = textPath;
},
// Draggable mode:
/**
* Redraw halo on mousemove during the drag&drop action.
*
* @param {Highcharts.Point} point The point that should show halo.
<<<<<<<
getLinkPath: function () {
var left = this.fromNode,
right = this.toNode;
// Start always from left to the right node, to prevent rendering labels
// upside down
if (left.plotX > right.plotX) {
left = this.toNode;
right = this.fromNode;
}
=======
/**
* Get link path connecting two nodes.
*
* @return {Array<Highcharts.SVGPathArray>} Path: `['M', x, y, 'L', x, y]`
*/
getLinkPath: function (from, to) {
>>>>>>>
/**
* Get link path connecting two nodes.
*
* @return {Array<Highcharts.SVGPathArray>} Path: `['M', x, y, 'L', x, y]`
*/
getLinkPath: function () {
var left = this.fromNode,
right = this.toNode;
// Start always from left to the right node, to prevent rendering labels
// upside down
if (left.plotX > right.plotX) {
left = this.toNode;
right = this.fromNode;
}
<<<<<<<
isValid: function () {
return !this.isNode || defined(this.id);
},
remove: function () {
if (this.isNode) {
this.series.layout.removeNode(this);
} else {
this.series.layout.removeLink(this);
}
return Point.prototype.remove.apply(this, arguments);
},
=======
>>>>>>>
isValid: function () {
return !this.isNode || defined(this.id);
}, |
<<<<<<<
export const panels = [
PanelTypes.ELEMENT_ALIGNMENT,
...MEDIA_PANELS,
PanelTypes.LINK,
];
=======
export const panels = [
...MEDIA_PANELS,
PanelTypes.LINK,
PanelTypes.IMAGE_ACCESSIBILITY,
];
>>>>>>>
export const panels = [
PanelTypes.ELEMENT_ALIGNMENT,
...MEDIA_PANELS,
PanelTypes.LINK,
PanelTypes.IMAGE_ACCESSIBILITY,
]; |
<<<<<<<
styleRegex,
hrefRegex,
=======
styleRegex = /<.*style="([^"]+)".*>/,
hrefRegex = /<.*href="(http[^"]+)".*>/,
>>>>>>>
styleRegex,
hrefRegex,
<<<<<<<
attribs = isObject(x) ? x : {
=======
attr = isObject(x) ? x : x === UNDEFINED ? {} : {
>>>>>>>
attribs = isObject(x) ? x : x === UNDEFINED ? {} : {
<<<<<<<
attribs.rx = attribs.ry = r;
}
wrapper.rSetter = function (value) {
attr(this.element, {
rx: value,
ry: value
});
};
=======
attr.r = r;
}
>>>>>>>
attribs.rx = attribs.ry = r;
}
wrapper.rSetter = function (value) {
attr(this.element, {
rx: value,
ry: value
});
};
<<<<<<<
var defaultChartStyle = defaultOptions.chart.style,
wrapper = this.createElement('span'),
=======
var wrapper = this.createElement('span'),
attrSetters = wrapper.attrSetters,
>>>>>>>
var wrapper = this.createElement('span'), |
<<<<<<<
// Always Remove group if exists
removeElement(this.legendProxyGroup);
=======
this.updateProxies();
},
/**
* @private
*/
updateProxies: function () {
this.removeElement(this.legendProxyGroup);
>>>>>>>
this.updateProxies();
},
/**
* @private
*/
updateProxies: function () {
removeElement(this.legendProxyGroup); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.