Thank you for making a great control! I'm using this circular slider with Ionic framework and am running into an error as described below. The circular slider has been working and only appeared after placing the circular slider within an Ionic modal, .
Perhaps you can provide some clues as to the root cause problem. Thank you!
var $$acs = $$(component.acs);
var $$acsIndicator = $$(component.acsIndicator);
cs.acsPosition = **$$acs.position()**;`
When offsetParent() is called the dom object is populated but the offsetParent = null.
In window.getComputedStyle() 'dom' is undefined.
<div class="modal-backdrop active"><div class="modal-backdrop-bg"></div><div class="modal-wrapper" ng-transclude=""><ion-modal-view class="applet-modal modal animated zoomIn ng-enter active ng-enter-active"><!-- ngInclude: 'applets/paymentcs/views/index.html' --><div ng-include="'applets/paymentcs/views/index.html'"><div ng-controller="paymentCSController as c">
<div class="applet-container" ng-style="{'background': c.applet.view.background}" style="background: rgb(247, 247, 247);">
<ion-nav-bar class="bar bar-header bar-stable side='right' nav-bar-container" nav-bar-transition="ios">
<ion-nav-buttons side="right" class="hide"></ion-nav-buttons>
<div class="nav-bar-block" nav-bar="cached"><ion-header-bar class="bar bar-header bar-stable side='right'" align-title="center"><div class="title title-center header-item"></div><div class="buttons buttons-right header-item"><span class="right-buttons">
<a class="button button-icon icon ion-close" ng-click="applet.close()"></a>
</span></div></ion-header-bar></div><div class="nav-bar-block" nav-bar="active"><ion-header-bar class="bar bar-header bar-stable side='right'" align-title="center"><div class="title title-center header-item" style="left: 61px; right: 61px;"></div><div class="buttons buttons-right header-item"><span class="right-buttons">
<a class="button button-icon icon ion-close" ng-click="applet.close()"></a>
</span></div></ion-header-bar></div></ion-nav-bar>
<div class="applet-content">
<div style="position: absolute; float: right; right: 50%;" ng-click="c.setCurrency()">
<div style="position: relative; float: right; right: -50%; top: 120px; z-index: 2; font-size: 32px; color: rgb(44, 62, 80);" ng-style="{'color': c.applet.view.csValueColor}" class="ng-binding">
25
</div>
</div>
<div style="position: absolute; float: right; right: 50%;" ng-click="c.setCurrency()">
<div style="position: relative; float: right; right: -50%; top: 160px; z-index: 2; font-size: 16px; color: rgb(44, 62, 80);" ng-style="{'color': c.applet.view.csValueColor}" class="ng-binding">
USD
</div>
</div>
<div class="text-center" style="position: absolute; width: 100%; top: 20px">
<style type="text/css" class="ng-binding">
.amount-slider .acs {
background: rgba(0,0,0,0);
border: 35px solid rgba(214, 214, 214, 0.5) !important;
}
.amount-slider .acs-value {
background: rgba(0,0,0,0);
border: 1px solid rgba(0,0,0,0);
}
.amount-slider .acs-indicator {
background: #909090;
border: none;
}
</style>
<circular-slider class="amount-slider acs-slider" shape="Circle" on-slide="c.onSlide" on-slide-end="c.onSlideEnd" radius="125" handle-dist-ratio="0.865" indicator-ball-ratio="0.28" min="c.min" max="c.max" value="c.amount"> <div class="acs-panel" style="border-width: 1px; border-radius: 251px;"> <div class="acs" style="width: 250px; height: 250px; border-radius: 250px; border-width: 1px;"> <div class="acs-value" ng-transclude="" style="width: 125px; height: 125px; font-size: 31.25px; top: 62.5px; left: 62.5px;">
</div> </div> <div class="acs-indicator" style="width: 35px; height: 35px;"> </div> </div> </circular-slider>
<div class="text-center m20t">
<button class="button outline round tiny" ng-click="c.pay()" ng-style="{'background': c.applet.view.payButtonBackground, 'border': c.applet.view.payButtonBorder, 'color': c.applet.view.payButtonColor}" style="border: 1px solid rgb(165, 178, 191); color: rgb(133, 151, 167); background: none;">
<span translate=""><span class="ng-binding">Donate now</span></span>
</button>
</div>
</div>
</div>
</div>
</div></div></ion-modal-view></div></div>