Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added the instructions to setup working environment #72

Merged
merged 12 commits into from
Mar 18, 2020
68 changes: 48 additions & 20 deletions src/demo.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,46 +25,74 @@

<div class="container">
<h1>Water Tanks</h1>
<div class="loading" style="width: 140px;height: 140px;float:left"></div>
<div class="loading" style="width: 160px;height: 160px;float:left"></div>
<div class="loading" style="width: 200px;height: 140px;float:left"></div>
<div class="loading" style="width: 200px;height: 160px;float:left"></div>
<div class="waterBall1" style="width: 200px;height:200px; float:left"></div>
<div class="demo" style="width: 200px;height:200px; float:left"></div>
</div>
<script src="https://code.jquery.com/jquery-3.2.1.min.js"></script>
<script type="text/javascript" src="lib/createWaterBall-jquery.js"></script>
<script>
$('.demo').createWaterBall({
targetRange: 90
});
// $('.demo').createWaterBall({
// wave_config: {
// waveWidth: 0.02,
// waveHeight: 10
// },
// targetRange: 50
// });

var loadingEle = $('.loading');
var loading_width = loadingEle.width(),
loading_height = loadingEle.height();
$('.loading').createWaterBall({
cvs_config: {
width: loading_width,
height: loading_height
// $('.loading').createWaterBall({
// cvs_config: {
// width: loading_width,
// height: loading_height
// },
// wave_config: {
// waveWidth: 0.02,
// waveHeight: 10
// },
// data_range: [30, 70, 100],
// isLoading: true,
// nowRange: 70,
// targetRange: 70
// });
// setTimeout(function () {
// $('.loading').createWaterBall('updateRange', 80);
// }, 1000);
$('.waterBall1').createWaterBall({
csv_config: {
width: $('.waterBall1').width(),
height: $('.waterBall1').height()
},
wave_config: {
waveWidth: 0.02,
waveHeight: 15
},
data_range: [40, 50, 100],
targetRange: 75
});
$('.demo').createWaterBall({
csv_config: {
width: $('.demo').width(),
height: $('.demo').height()
},
wave_config: {
waveWidth: 0.02,
waveHeight: 5
waveHeight: 15
},
data_range: [30, 70, 100],
isLoading: true,
nowRange: 70,
data_range: [40, 50, 100],
targetRange: 70
});
setTimeout(function () {
$('.loading').createWaterBall('updateRange', 80);
}, 1000);
$('.waterBall1').createWaterBall({
$('.loading').createWaterBall({
csv_config: {
width: $('.waterBall1').width(),
height: $('.waterBall1').height()
width: $('.loading').width(),
height: $('.loading').height()
},
wave_config: {
waveWidth: 0.02,
waveHeight: 5
waveHeight: 15
},
data_range: [40, 50, 100],
targetRange: 45
Expand Down
80 changes: 61 additions & 19 deletions src/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
}
</style>
</head>

<body>
<div class="container">
<center>
Expand Down Expand Up @@ -133,26 +133,68 @@ <h1>Safe Zone</h1>
</p>
</div>

<script src="https://code.jquery.com/jquery-3.2.1.min.js"></script>
<script type="text/javascript" src="lib/createWaterBall-jquery.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<script>
//var x=30;
//alert("vini");
//var qs = window.GetQueryString(query);
<script src="https://code.jquery.com/jquery-3.2.1.min.js"></script>
<script type="text/javascript" src="lib/createWaterBall-jquery.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<script src="https://code.jquery.com/jquery-3.2.1.min.js"></script>
<script type="text/javascript" src="lib/createWaterBall-jquery.js"></script>
<script>

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vngarg The PR should be issue-specific, I can see the changes for another issue (animation) here. Please remove the changes or create a fresh branch and raise a new PR.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok sir, I'll fix this ...
Also, please review my another PR for the animation #128

var loadingEle = $('.loading');
var loading_width = loadingEle.width(),
loading_height = loadingEle.height();

$('.tank1').createWaterBall({
csv_config: {
width: $('.tank1').width(),
height: $('.tank1').height()
},
wave_config: {
waveWidth: 0.02,
waveHeight: 15
},
data_range: [40, 50, 100],
targetRange: 55
});

$('.tank2').createWaterBall({
csv_config: {
width: $('.tank2').width(),
height: $('.tank2').height()
},
wave_config: {
waveWidth: 0.02,
waveHeight: 15
},
data_range: [40, 50, 100],
targetRange: 25
});

//var x = window.getParameterByName('foo');
$('.tank3').createWaterBall({
csv_config: {
width: $('.tank3').width(),
height: $('.tank3').height()
},
wave_config: {
waveWidth: 0.02,
waveHeight: 15
},
data_range: [40, 50, 100],
targetRange: 45
});

/* function getParameterByName(name) {

var match = RegExp('[?]' + foo + '=')
.exec(window.location.search);

return match ?
decodeURIComponent(match[1].replace(/+/g, ' '))
: null;

}*/
$('.tank4').createWaterBall({
csv_config: {
width: $('.tank4').width(),
height: $('.tank4').height()
},
wave_config: {
waveWidth: 0.02,
waveHeight: 15
},
data_range: [40, 50, 100],
targetRange: 80
});

function getQueryStringValue(key) {
return decodeURIComponent(
Expand Down