Skip to content

Introduces ES5 properites and camelCase naming conventions #273

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

Merged
merged 7 commits into from
Aug 27, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -3,9 +3,9 @@
<DebugType>full</DebugType>
<DebugSymbols>true</DebugSymbols>

<Version>0.9.4</Version>
<AssemblyVersion>0.9.4.0</AssemblyVersion>
<FileVersion>0.9.4.0</FileVersion>
<Version>0.9.5</Version>
<AssemblyVersion>0.9.5.0</AssemblyVersion>
<FileVersion>0.9.5.0</FileVersion>
<Authors>Danielku15</Authors>
<Company>CoderLine</Company>
<Product>AlphaTab</Product>
2 changes: 1 addition & 1 deletion Documentation/input/examples/general/tracks.cshtml
Original file line number Diff line number Diff line change
@@ -38,7 +38,7 @@ Order: 1
</div>
<div class="tab-pane example" id="all">
<div class="html">
<div id="alphaTabAll" data-file="@Context.GetLink("/assets/files/TwoTracks")" data-tracks="all"></div>
<div id="alphaTabAll" data-file="@Context.GetLink("/assets/files/TwoTracks.gp")" data-tracks="all"></div>
</div>
<div class="js">
<script type="text/x-alphatab">
2 changes: 1 addition & 1 deletion Documentation/input/features/layouts.cshtml
Original file line number Diff line number Diff line change
@@ -88,7 +88,7 @@ Order: 1
This is another layout type available. All bars are aligned horizontally.
</p>

<div id="alphaTabHorizontal" data-file="@Context.GetLink("/assets/files/features/Skillet.gp5")"></div>
<div id="alphaTabHorizontal" data-file="@Context.GetLink("/assets/files/features/Skillet.gp5")" style="overflow: auto"></div>
<script type="text/javascript">
$('#alphaTabHorizontal').alphaTab({
layout: {
4 changes: 2 additions & 2 deletions Documentation/input/reference/api/islooping.cshtml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Title: IsLooping
JsName: get_IsLooping;set_IsLooping
JsName: isLooping
jQueryName: alphaTab('looping')
Category: Properties - Player
Description: Whether the playback should automatically restart after it finished
@@ -42,7 +42,7 @@ api.IsLooping = true;
<pre>
<code class="language-javascript line-numbers">
var api = new alphaTab.platform.javaScript.AlphaTabApi(document.querySelector('#alphaTab'));
api.set_IsLooping(true);
api.isLooping = true;
</code>
</pre>

4 changes: 2 additions & 2 deletions Documentation/input/reference/api/isreadyforplayback.cshtml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Title: IsReadyForPlayback
JsName: get_IsReadyForPlayback;get_IsReadyForPlayback
JsName: isReadyForPlayback
jQueryName: alphaTab('isReadyForPlayback')
Category: Properties - Player
Description: Whether the player is ready for starting the playback.
@@ -40,7 +40,7 @@ if(api.IsReadyForPlayback) api.Play();
<pre>
<code class="language-javascript line-numbers">
var api = new alphaTab.platform.javaScript.AlphaTabApi(document.querySelector('#alphaTab'));
if(api.get_IsReadyForPlayback()) api.play();
if(api.isReadyForPlayback)) api.play();
</code>
</pre>

4 changes: 2 additions & 2 deletions Documentation/input/reference/api/mastervolume.cshtml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Title: MasterVolume
JsName: get_MasterVolume;set_MasterVolume
JsName: masterVolume
jQueryName: alphaTab('masterVolume')
Category: Properties - Player
Description: The current master volume as percentage
@@ -43,7 +43,7 @@ api.MasterVolume = 0.5f;
<pre>
<code class="language-javascript line-numbers">
var api = new alphaTab.platform.javaScript.AlphaTabApi(document.querySelector('#alphaTab'));
api.set_MasterVolume(0.5);
api.masterVolume = 0.5;
</code>
</pre>

4 changes: 2 additions & 2 deletions Documentation/input/reference/api/metronomevolume.cshtml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Title: MetronomeValue
JsName: get_MetronomeValue;set_MetronomeValue
JsName: metronomeValue
jQueryName: alphaTab('metronomeValue')
Category: Properties - Player
Description: The metronome volume as percentage
@@ -43,7 +43,7 @@ api.MetronomeValue = 0.5f;
<pre>
<code class="language-javascript line-numbers">
var api = new alphaTab.platform.javaScript.AlphaTabApi(document.querySelector('#alphaTab'));
api.set_MetronomeValue(0.5);
api.metronomeValue = 0.5;
</code>
</pre>

4 changes: 2 additions & 2 deletions Documentation/input/reference/api/playbackrange.cshtml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Title: PlaybackRange
JsName: get_PlaybackRange;set_PlaybackRange
JsName: playbackRange
jQueryName: alphaTab('playbackRange')
Category: Properties - Player
Description: The range of the song that should be played
@@ -78,7 +78,7 @@ api.PlaybackRange = new PlaybackRange { StartTick = 1000, EndTick = 50000 };
<pre>
<code class="language-javascript line-numbers">
var api = new alphaTab.platform.javaScript.AlphaTabApi(document.querySelector('#alphaTab'));
api.set_PlaybackRange({ startTick: 1000, endTick: 50000 });
api.playbackRange = { startTick: 1000, endTick: 50000 };
</code>
</pre>

4 changes: 2 additions & 2 deletions Documentation/input/reference/api/playbackspeed.cshtml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Title: PlaybackSpeed
JsName: get_PlaybackSpeed;set_PlaybackSpeed
JsName: playbackSpeed
jQueryName: alphaTab('playbackSpeed')
Category: Properties - Player
Description: The current playback speed as percentage
@@ -43,7 +43,7 @@ api.PlaybackSpeed = 0.5f;
<pre>
<code class="language-javascript line-numbers">
var api = new alphaTab.platform.javaScript.AlphaTabApi(document.querySelector('#alphaTab'));
api.set_PlaybackSpeed(0.5);
api.playbackSpeed(0.5);
</code>
</pre>

16 changes: 8 additions & 8 deletions Documentation/input/reference/api/playerfinished.cshtml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Title: PlayerFinished
JsName: add_PlayerFinished();remove_PlayerFinished()
JsName: addPlayerFinished();removePlayerFinished()
DomName: alphaTab.finished
Category: Events - Player
Description: This event is fired when the playback of the whole song finished.
@@ -50,12 +50,12 @@ api.Play();
<pre>
<code class="language-javascript line-numbers">
var api = new alphaTab.platform.javaScript.AlphaTabApi(document.querySelector('#alphaTab'));
api.add_Finished(function(args) {
api.addFinished(function(args) {
// speed trainer
api.set_PlaybackSpeed(Math.min(1.0, api.get_PlaybackSpeed() + 0.1));
api.playbackSpeed = Math.min(1.0, api.playbackSpeed + 0.1);
});
api.set_IsLooping(true);
api.set_PlaybackSpeed(0.5);
api.isLooping = true;
api.playbackSpeed = 0.5;
api.play()
</code>
</pre>
@@ -81,13 +81,13 @@ at.alphaTab('play');
var at = document.querySelector('#alphaTab');
var api = null;
at.addEventListener('alphaTab.finished', function(e) {
api.set_PlaybackSpeed(Math.min(1.0, api.PlaybackSpeed + 0.1));
api.playbackSpeed = Math.min(1.0, api.playbackSpeed + 0.1);
}, false);


api = new alphaTab.platform.javaScript.AlphaTabApi(at);
api.set_IsLooping(true);
api.set_PlaybackSpeed(0.5);
api.isLooping = true;
api.playbackSpeed = 0.5;
api.play()
</code>
</pre>
4 changes: 2 additions & 2 deletions Documentation/input/reference/api/playerstate.cshtml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Title: PlayerState
JsName: get_PlayerState;get_PlayerState
JsName: playerState
jQueryName: alphaTab('playerState')
Category: Properties - Player
Description: The current player state
@@ -42,7 +42,7 @@ if(api.PlayerState != PlayerState.Playing) api.Play();
<pre>
<code class="language-javascript line-numbers">
var api = new alphaTab.platform.javaScript.AlphaTabApi(document.querySelector('#alphaTab'));
if(api.get_PlayerState() != 1) api.play();
if(api.playerState != 1) api.play();
</code>
</pre>

4 changes: 2 additions & 2 deletions Documentation/input/reference/api/tickposition.cshtml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Title: TickPosition
JsName: get_TickPosition;set_TickPosition
JsName: tickPosition
jQueryName: alphaTab('tickPosition')
Category: Properties - Player
Description: The position within the song in midi ticks
@@ -39,7 +39,7 @@ api.TickPosition = 4000;
<pre>
<code class="language-javascript line-numbers">
var api = new alphaTab.platform.javaScript.AlphaTabApi(document.querySelector('#alphaTab'));
api.set_TickPosition(4000);
api.tickPosition = 4000;
</code>
</pre>

4 changes: 2 additions & 2 deletions Documentation/input/reference/api/timeposition.cshtml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Title: TimePosition
JsName: get_TimePosition;set_TimePosition
JsName: timePosition
jQueryName: alphaTab('timePosition')
Category: Properties - Player
Description: The position within the song in milliseconds
@@ -39,7 +39,7 @@ api.TimePosition = 4000;
<pre>
<code class="language-javascript line-numbers">
var api = new alphaTab.platform.javaScript.AlphaTabApi(document.querySelector('#alphaTab'));
api.set_TimePosition(4000);
api.timePosition = 4000;
</code>
</pre>

4 changes: 2 additions & 2 deletions Documentation/input/reference/events/error.cshtml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Title: Error
JsName: add_Error();remove_Error()
JsName: addError();removeError()
DomName: alphaTab.error
Category: Events - Core
Description: This event is fired when an error within alphatab occurred.
@@ -77,7 +77,7 @@ api.Error += (type, details) =>
<pre>
<code class="language-javascript line-numbers">
var api = new alphaTab.platform.javaScript.AlphaTabApi(document.querySelector('#alphaTab'));
api.add_Error(function(type, details) {
api.addError(function(type, details) {
displayError(type, details);
});
</code>
4 changes: 2 additions & 2 deletions Documentation/input/reference/events/loaded.cshtml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Title: Loaded
JsName: add_Loaded();remove_Loaded()
JsName: addLoaded();removeLoaded()
DomName: alphaTab.loaded
Category: Events - Core
Description: This event is fired whenever a new song is loaded
@@ -65,7 +65,7 @@ api.Loaded += score =>
<pre>
<code class="language-javascript line-numbers">
var api = new alphaTab.platform.javaScript.AlphaTabApi(document.querySelector('#alphaTab'));
api.add_Loaded(function(score) {
api.addLoaded(function(score) {
updateSongInformationInUi(score);
});
</code>
4 changes: 2 additions & 2 deletions Documentation/input/reference/events/midiloaded.cshtml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Title: MidiLoaded
JsName: add_MidiLoaded();remove_MidiLoaded()
JsName: addMidiLoaded();removeMidiLoaded()
DomName: alphaTab.midiFileLoaded
Category: Events - Player
Description: This event is fired when the Midi file needed for playback was loaded.
@@ -46,7 +46,7 @@ api.MidiLoaded += () =>
<pre>
<code class="language-javascript line-numbers">
var api = new alphaTab.platform.javaScript.AlphaTabApi(document.querySelector('#alphaTab'));
api.add_MidiLoaded(function(score) {
api.addMidiLoaded(function(score) {
hideGeneratingAudioIndicator();
});
</code>
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Title: PlayerPositionChanged
JsName: add_PlayerPositionChanged();remove_PlayerPositionChanged()
JsName: addPlayerPositionChanged();removePlayerPositionChanged()
DomName: alphaTab.positionChanged
Category: Events - Player
Description: This event is fired when the playback state changed.
@@ -118,7 +118,7 @@ api.PlayerPositionChanged += args =>
<pre>
<code class="language-javascript line-numbers">
var api = new alphaTab.platform.javaScript.AlphaTabApi(document.querySelector('#alphaTab'));
api.add_PlayerPositionChanged(function(args) {
api.addPlayerPositionChanged(function(args) {
updatePlayerPosition(args);
});
</code>
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Title: PlayerStateChanged
JsName: add_PlayerStateChanged();remove_PlayerStateChanged()
JsName: addPlayerStateChanged();removePlayerStateChanged()
DomName: alphaTab.playerStateChanged
Category: Events - Player
Description: This event is fired when the playback state changed.
@@ -110,7 +110,7 @@ api.PlayerStateChanged += args =>
<pre>
<code class="language-javascript line-numbers">
var api = new alphaTab.platform.javaScript.AlphaTabApi(document.querySelector('#alphaTab'));
api.add_PlayerStateChanged(function(args) {
api.addPlayerStateChanged(function(args) {
updatePlayerControls(args.State, args.Stopped);
});
</code>
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Title: PostRenderFinished
JsName: add_PostRenderFinished();remove_PostRenderFinished()
JsName: addPostRenderFinished();removePostRenderFinished()
DomName: alphaTab.postRenderFinished
Category: Events - Core
Description: This event is fired when the rendering of the whole music sheet is finished, and all handlers of RenderFinished ran.
@@ -47,7 +47,7 @@ api.PostRenderFinished += () =>
<pre>
<code class="language-javascript line-numbers">
var api = new alphaTab.platform.javaScript.AlphaTabApi(document.querySelector('#alphaTab'));
api.add_PostRenderFinished(function() {
api.addPostRenderFinished(function() {
hideLoadingIndicator();
});
</code>
4 changes: 2 additions & 2 deletions Documentation/input/reference/events/readyforplayback.cshtml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Title: ReadyForPlayback
JsName: add_ReadyForPlayback();remove_ReadyForPlayback()
JsName: addReadyForPlayback();removeReadyForPlayback()
DomName: alphaTab.playerReady
Category: Events - Player
Description: This event is fired when all required data for playback is loaded and ready.
@@ -47,7 +47,7 @@ api.ReadyForPlayback += () =>
<pre>
<code class="language-javascript line-numbers">
var api = new alphaTab.platform.javaScript.AlphaTabApi(document.querySelector('#alphaTab'));
api.add_ReadyForPlayback(function(score) {
api.addReadyForPlayback(function(score) {
enablePlayerControls();
});
</code>
4 changes: 2 additions & 2 deletions Documentation/input/reference/events/renderfinished.cshtml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Title: RenderFinished
JsName: add_RenderFinished();remove_RenderFinished()
JsName: addRenderFinished();removeRenderFinished()
DomName: alphaTab.rendered
Category: Events - Core
Description: This event is fired when the rendering of the whole music sheet is finished.
@@ -46,7 +46,7 @@ api.RenderFinished += () =>
<pre>
<code class="language-javascript line-numbers">
var api = new alphaTab.platform.javaScript.AlphaTabApi(document.querySelector('#alphaTab'));
api.add_RenderFinished(function() {
api.addRenderFinished(function() {
updateProgressBar("Finishing");
});
</code>
4 changes: 2 additions & 2 deletions Documentation/input/reference/events/resize.cshtml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Title: Resize
JsName: add_Resize();remove_Resize()
JsName: addResize();removeResize()
DomName: alphaTab.resize
Category: Events - Core
Description: This event is fired when alphaTab was resized and is about to rerender the music notation.
@@ -112,7 +112,7 @@ api.Resize += args =>
<pre>
<code class="language-javascript line-numbers">
var api = new alphaTab.platform.javaScript.AlphaTabApi(document.querySelector('#alphaTab'));
api.add_Resize(function(args) {
api.addResize(function(args) {
args.Settings.Scale = args.NewWidth > 1300
? 1.5f
: (args.NewWidth > 800) ? 1.3f : 1;
4 changes: 2 additions & 2 deletions Documentation/input/reference/events/soundfontloaded.cshtml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Title: SoundFontLoaded
JsName: add_SoundFontLoaded();remove_SoundFontLoaded()
JsName: addSoundFontLoaded();removeSoundFontLoaded()
DomName: alphaTab.soundFontLoaded
Category: Events - Player
Description: This event is fired when the SoundFont needed for playback was loaded.
@@ -46,7 +46,7 @@ api.SoundFontLoaded += () =>
<pre>
<code class="language-javascript line-numbers">
var api = new alphaTab.platform.javaScript.AlphaTabApi(document.querySelector('#alphaTab'));
api.add_SoundFontLoaded(function(score) {
api.addSoundFontLoaded(function(score) {
hideSoundFontLoadingIndicator();
});
</code>
Binary file modified Phase/Compiler/Phase.Translator.dll
Binary file not shown.
Binary file modified Phase/Compiler/Phase.Translator.pdb
Binary file not shown.
4 changes: 2 additions & 2 deletions Phase/Mscorlib/system/Boolean.hx
Original file line number Diff line number Diff line change
@@ -4,8 +4,8 @@ abstract Boolean(Bool) from Bool to Bool
{
public inline function new(v:Bool) this = v;

public inline function ToHaxeBool() : Bool return this;
public inline function ToString() : system.CsString return Std.string(this);
public inline function toHaxeBool() : Bool return this;
public inline function toString() : system.CsString return Std.string(this);

@:op(!A) public inline function not() : system.Boolean return !this;

Loading