Skip to content

Commit 08ff6f9

Browse files
committed
cleanup
1 parent 39da255 commit 08ff6f9

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "uplot-react-native",
3-
"version": "0.1.9",
3+
"version": "0.1.10",
44
"description": "React Native wrapper for uPlot on web, iOS, and Android",
55
"homepage": "https://github.com/murphycj/uplot-react-native",
66
"bugs": {

src/components/ChartUPlot.tsx

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -710,9 +710,9 @@ const ChartUPlot = forwardRef<any, UPlotProps>(
710710
// function to call setScale
711711
const setScale = useCallback((axis: string, options: any): void => {
712712
if (!isWeb && !loadedRef.current) return;
713-
console.log(
714-
`setScale | name=${name}, axis=${axis}, options=${JSON.stringify(options)}`,
715-
);
713+
// console.log(
714+
// `setScale | name=${name}, axis=${axis}, options=${JSON.stringify(options)}`,
715+
// );
716716

717717
if (isWeb) {
718718
uplotInstance.current?.setScale(axis, options);
@@ -737,9 +737,9 @@ const ChartUPlot = forwardRef<any, UPlotProps>(
737737
// if native, sets the variable to window.[name] via webref.current.injectJavaScript
738738
const setVariable = useCallback((name: string, value: any): void => {
739739
if (!isWeb && !loadedRef.current) return;
740-
console.log(
741-
`setVariable | name=${name}, name=${name}, value=${JSON.stringify(value)}`,
742-
);
740+
// console.log(
741+
// `setVariable | name=${name}, name=${name}, value=${JSON.stringify(value)}`,
742+
// );
743743

744744
variablesRef.current[name] = value;
745745

@@ -766,7 +766,7 @@ const ChartUPlot = forwardRef<any, UPlotProps>(
766766
// function to call setSize
767767
const setSize = useCallback((width: number, height: number): void => {
768768
if (!isWeb && !loadedRef.current) return;
769-
console.log(`setSize | name=${name}, width=${width}, height=${height}`);
769+
// console.log(`setSize | name=${name}, width=${width}, height=${height}`);
770770

771771
if (isWeb) {
772772
uplotInstance.current?.setSize(width, height);
@@ -790,9 +790,9 @@ const ChartUPlot = forwardRef<any, UPlotProps>(
790790
// function to call destroy, also clears the data
791791
const destroy = useCallback((keepData: boolean = false): void => {
792792
if (!isWeb && !loadedRef.current) return;
793-
console.log(
794-
`destroy | name=${name}, keepData=${keepData}, data=${data?.length}`,
795-
);
793+
// console.log(
794+
// `destroy | name=${name}, keepData=${keepData}, data=${data?.length}`,
795+
// );
796796

797797
if (!keepData) {
798798
dataRef.current = [];
@@ -837,7 +837,7 @@ const ChartUPlot = forwardRef<any, UPlotProps>(
837837
const reset = useCallback(
838838
(opts: any, data: number[][], bgColor?: string): void => {
839839
if (!isWeb && !loadedRef.current) return;
840-
console.log(`reset | name=${name}`);
840+
// console.log(`reset | name=${name}`);
841841
destroy();
842842
createChart(opts, data, bgColor);
843843
},

0 commit comments

Comments
 (0)