jeller Posted November 10, 2022 Report Share Posted November 10, 2022 Hi, I'm trying to incorporate the handviewer into my bridge lessons but running into some problems with end positions.Just a hand, works fine, even the play sequence. n=S2HK5DAQT84C97542&s=SKT8HJ72DJ6532CT3&w=SAQ97643HTDK9CKQJ&a=2dppp&&sn=Fred&b=23&d=n&v=b&p=sjsksas2sqd4s5s8 But now I want to jump to an end position with north to lead. But if I use this with the same auction and press play. I have to lead from east as north is declarern=SHK5DC5&s=SHJ7DC3&w=SHTDCQJ&e=SHAQDCA&sn=Fred&b=23&d=n&v=b&&a=2dppp When looking in the handviewer documentation: "Sometimes there is a need to create a presentation whereby either the contract or the player on lead and the trump suit is specified, but it is not appropriate to display an auction. This can be accomplished by setting the first character of the a parameter to a minus sign (-) and using the next few characters as follows:"- For end position diagrams, use the next two characters to specify the player on lead and the trump suit. For example: a=-sc will put South on lead with clubs as trump. But when I use the minus sign to force the lead to north, the handviewer sort of crashes (no auction visible, no board number visible, no play button)n=SHK5DC5&s=SHJ7DC3&w=SHTDCQJ&e=SHAQDCA&sn=Fred&b=23&d=n&v=b&&a=-nd not using the minus sign and just a=nd will result in displaying all buttons again and even it looks north has to lead when pressing the play button you cannot select a card as there is no aution I sort of can fix it with a non cool workaround to make west dealer and declarer so north has to lead when pressing play, but that messes up the auction.n=SHK5DC5&s=SHJ7DC3&w=SHTDCQJ&e=SHAQDCA&sn=Fred&b=23&d=w&v=b&&a=2dppp anyone with a better solution than my workaround? thanks! Quote Link to comment Share on other sites More sharing options...
thorvald Posted November 10, 2022 Report Share Posted November 10, 2022 Interesting problem To show the Button with "Play" there has to be an auction or a played card So https://www.bridgeba...&d=n&v=b&&a=-nd will not show the buttons as you have seen. I found a trick to add the buttons in this situation by adding a played card, looking like this https://www.bridgeba...v=b&&a=-nd&p=c2 Now the problem is that there is no declarer, so when pressing play it is not possible to select any card We can use the a=- a more subtle way, by using a=-2dn but that would still place East as the one to lead So using your nice little trick we can change it to https://www.bridgeba...=b&&a=-2dw&p=c2 Now the auction is not displayed and only if you look in lower right corner you will see west as declarer - and that box is not correct anyway as the tricks are incorrect Last trick is to hide the box with declarer and tricks, and the only way I have found it can be done is editing the page after it is shown (setting the box to hidden) Quote Link to comment Share on other sites More sharing options...
jeller Posted November 10, 2022 Author Report Share Posted November 10, 2022 thx! It's at least an improvement to what I came up with. I have now downloaded it to local drive and tweaked a bit in the javascript handviewer.jssearch in function manageTricksDiv() for the line tricksDiv.style.left = 0; and insert the line below after the found linetricksDiv.style.display = "none"; now the right corner box is 'gone' 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.